mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1207827 - Fix ARM64 OOM bugs in Assembler::bind(). r=nbp
--HG-- extra : rebase_source : 2fe66f442dd68ebb8a3cf09cb638f649b9e61466
This commit is contained in:
parent
84e7b07d84
commit
cd23e799de
@ -221,7 +221,10 @@ void
|
||||
Assembler::bind(Label* label, BufferOffset targetOffset)
|
||||
{
|
||||
// Nothing has seen the label yet: just mark the location.
|
||||
if (!label->used()) {
|
||||
// If we've run out of memory, don't attempt to modify the buffer which may
|
||||
// not be there. Just mark the label as bound to the (possibly bogus)
|
||||
// targetOffset.
|
||||
if (!label->used() || oom()) {
|
||||
label->bind(targetOffset.getOffset());
|
||||
return;
|
||||
}
|
||||
@ -259,7 +262,9 @@ void
|
||||
Assembler::bind(RepatchLabel* label)
|
||||
{
|
||||
// Nothing has seen the label yet: just mark the location.
|
||||
if (!label->used()) {
|
||||
// If we've run out of memory, don't attempt to modify the buffer which may
|
||||
// not be there. Just mark the label as bound to nextOffset().
|
||||
if (!label->used() || oom()) {
|
||||
label->bind(nextOffset().getOffset());
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user