Bug 1254380 part 3. Skip firing error events for mainthread out of memory exceptions via AutoJSAPI::ReportException. r=bholley

This commit is contained in:
Boris Zbarsky 2016-03-08 17:21:40 -05:00
parent 81b9b7ac71
commit 2e2d6cac3d

View File

@ -545,7 +545,7 @@ AutoJSAPI::ReportException()
xpcReport->Init(jsReport.report(), jsReport.message(),
nsContentUtils::IsCallerChrome(),
inner ? inner->WindowID() : 0);
if (inner) {
if (inner && jsReport.report()->errorNumber != JSMSG_OUT_OF_MEMORY) {
DispatchScriptErrorEvent(inner, JS_GetRuntime(cx()), xpcReport, exn);
} else {
JS::Rooted<JSObject*> stack(cx(), xpc::FindExceptionStack(cx(), exn));