mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1249183 - Suppress GC harder, r=terrence
--HG-- extra : rebase_source : f6d1c9deda5da4fa0c8852705995d87a8d7c0d19
This commit is contained in:
parent
2ba7941cda
commit
ad179d42f2
@ -295,12 +295,11 @@ js::ReportOutOfMemory(ExclusiveContext* cxArg)
|
||||
|
||||
JSContext* cx = cxArg->asJSContext();
|
||||
cx->runtime()->hadOutOfMemory = true;
|
||||
AutoSuppressGC suppressGC(cx);
|
||||
|
||||
/* Report the oom. */
|
||||
if (JS::OutOfMemoryCallback oomCallback = cx->runtime()->oomCallback) {
|
||||
AutoSuppressGC suppressGC(cx);
|
||||
if (JS::OutOfMemoryCallback oomCallback = cx->runtime()->oomCallback)
|
||||
oomCallback(cx, cx->runtime()->oomCallbackData);
|
||||
}
|
||||
|
||||
if (cx->options().autoJSAPIOwnsErrorReporting() || JS_IsRunning(cx)) {
|
||||
cx->setPendingException(StringValue(cx->names().outOfMemory));
|
||||
@ -318,10 +317,8 @@ js::ReportOutOfMemory(ExclusiveContext* cxArg)
|
||||
PopulateReportBlame(cx, &report);
|
||||
|
||||
/* Report the error. */
|
||||
if (JSErrorReporter onError = cx->runtime()->errorReporter) {
|
||||
AutoSuppressGC suppressGC(cx);
|
||||
if (JSErrorReporter onError = cx->runtime()->errorReporter)
|
||||
onError(cx, msg, &report);
|
||||
}
|
||||
|
||||
/*
|
||||
* We would like to enforce the invariant that any exception reported
|
||||
|
Loading…
Reference in New Issue
Block a user