Bug 1214781 - Make oomTest() clear any previous OOM condition r=terrence

This commit is contained in:
Jon Coppeard 2015-10-16 11:47:02 +01:00
parent 5207756269
commit b35177a4cd
2 changed files with 11 additions and 0 deletions

View File

@ -1107,6 +1107,9 @@ OOMTest(JSContext* cx, unsigned argc, Value* vp)
return true;
}
MOZ_ASSERT(!cx->isExceptionPending());
cx->runtime()->hadOutOfMemory = false;
RootedFunction function(cx, &args[0].toObject().as<JSFunction>());
bool verbose = EnvVarIsDefined("OOM_VERBOSE");

View File

@ -0,0 +1,8 @@
if (!('oomTest' in this))
quit();
try {
gcparam("maxBytes", gcparam("gcBytes"));
newGlobal("");
} catch (e) {};
oomTest(function() {})