Bug 1593329 - Make oomTest delazify its thunk first so that allocations doing that don't mask those in the thunk itself r=sfink

Differential Revision: https://phabricator.services.mozilla.com/D52026

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jon Coppeard 2019-11-08 10:44:31 +00:00
parent c40c0bf0af
commit 6ee34c1680
2 changed files with 7 additions and 1 deletions

View File

@ -2166,6 +2166,12 @@ bool RunIterativeFailureTest(JSContext* cx,
JS_SetGCZeal(cx, 0, JS_DEFAULT_ZEAL_FREQ);
# endif
// Delazify the function here if necessary so we don't end up testing that.
if (params.testFunction->isInterpreted() &&
!JSFunction::getOrCreateScript(cx, params.testFunction)) {
return false;
}
size_t compartmentCount = CountCompartments(cx);
RootedValue exception(cx);

View File

@ -21,4 +21,4 @@ dbg.onNewScript = script => {};
// the correct condition).
oomTest(() => {
g.eval("(function() {})");
});
}, {expectExceptionOnFailure: false});