mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 1019684 - Turn an assert into a release mode crash instead. r=mjrosenb
This commit is contained in:
parent
e25e863297
commit
56158800ea
@ -1861,7 +1861,7 @@ Assembler::as_b(Label *l, Condition c, bool isPatchable)
|
||||
// This will currently throw an assertion if we couldn't actually
|
||||
// encode the offset of the branch.
|
||||
if (!BOffImm::isInRange(old)) {
|
||||
m_buffer.bail();
|
||||
m_buffer.fail_bail();
|
||||
return ret;
|
||||
}
|
||||
ret = as_b(BOffImm(old), c, isPatchable);
|
||||
@ -1923,7 +1923,7 @@ Assembler::as_bl(Label *l, Condition c)
|
||||
// encode the offset of the branch.
|
||||
old = l->offset();
|
||||
if (!BOffImm::isInRange(old)) {
|
||||
m_buffer.bail();
|
||||
m_buffer.fail_bail();
|
||||
return ret;
|
||||
}
|
||||
ret = as_bl(BOffImm(old), c);
|
||||
|
@ -984,7 +984,8 @@ class BOffImm
|
||||
: data ((offset - 8) >> 2 & 0x00ffffff)
|
||||
{
|
||||
JS_ASSERT((offset & 0x3) == 0);
|
||||
JS_ASSERT(isInRange(offset));
|
||||
if (!isInRange(offset))
|
||||
CrashAtUnhandlableOOM("BOffImm");
|
||||
}
|
||||
static bool isInRange(int offset)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user