зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1211962 - addNativeToBytecodeEntry: Check that the masm.currentOffset() returns a valid result. r=djvj
This commit is contained in:
Родитель
e7aabfcb3a
Коммит
c1ecd2ffc8
|
@ -0,0 +1,11 @@
|
||||||
|
// |jit-test| slow;
|
||||||
|
load(libdir + "oomTest.js");
|
||||||
|
|
||||||
|
enableSPSProfiling();
|
||||||
|
var lfGlobal = newGlobal();
|
||||||
|
for (lfLocal in this) {
|
||||||
|
lfGlobal[lfLocal] = this[lfLocal];
|
||||||
|
}
|
||||||
|
const script = 'oomTest(() => getBacktrace({args: true, locals: "123795", thisprops: true}));';
|
||||||
|
lfGlobal.offThreadCompileScript(script);
|
||||||
|
lfGlobal.runOffThreadScript();
|
|
@ -208,6 +208,11 @@ CodeGeneratorShared::addNativeToBytecodeEntry(const BytecodeSite* site)
|
||||||
if (!isProfilerInstrumentationEnabled())
|
if (!isProfilerInstrumentationEnabled())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Fails early if the last added instruction caused the macro assembler to
|
||||||
|
// run out of memory as continuity assumption below do not hold.
|
||||||
|
if (masm.oom())
|
||||||
|
return false;
|
||||||
|
|
||||||
MOZ_ASSERT(site);
|
MOZ_ASSERT(site);
|
||||||
MOZ_ASSERT(site->tree());
|
MOZ_ASSERT(site->tree());
|
||||||
MOZ_ASSERT(site->pc());
|
MOZ_ASSERT(site->pc());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче