Bug 801114 - Remove JSD's unused out-of-memory hook; r=billm

--HG--
rename : content/canvas/test/test_toBlob.html => content/canvas/test/test_mozGetAsFile.html
rename : dom/base/test/test_gsp-qualified.html => dom/base/test/test_gsp-standards.html
rename : dom/bindings/ExampleGen.py => dom/bindings/BindingGen.py
rename : dom/tests/mochitest/chrome/file_bug800817.xul => dom/tests/mochitest/chrome/file_bug799299.xul
rename : dom/tests/mochitest/chrome/test_bug800817.xul => dom/tests/mochitest/chrome/test_bug799299.xul
extra : rebase_source : bea54e63e4712ab097b7d7882092968aed82170b
This commit is contained in:
Terrence Cole 2012-10-19 10:49:48 -07:00
parent e529312818
commit 655049da80

View File

@ -651,20 +651,10 @@ js_ReportOutOfMemory(JSContext *cx)
PopulateReportBlame(cx, &report);
/*
* If debugErrorHook is present then we give it a chance to veto sending
* the error on to the regular ErrorReporter. We also clear a pending
* exception if any now so the hooks can replace the out-of-memory error
* by a script-catchable exception.
* We clear a pending exception, if any, now so the hook can replace the
* out-of-memory error by a script-catchable exception.
*/
cx->clearPendingException();
if (onError) {
JSDebugErrorHook hook = cx->runtime->debugHooks.debugErrorHook;
if (hook &&
!hook(cx, msg, &report, cx->runtime->debugHooks.debugErrorHookData)) {
onError = NULL;
}
}
if (onError) {
AutoAtomicIncrement incr(&cx->runtime->inOOMReport);
onError(cx, msg, &report);