зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1070842 - Factor script error event dispatch into a separate function. r=bz
This commit is contained in:
Родитель
94bd419133
Коммит
8b421a48d3
|
@ -486,10 +486,17 @@ SystemErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
|
|||
|
||||
// Otherwise, we need to asynchronously invoke onerror before we can decide
|
||||
// whether or not to report the error to the console.
|
||||
nsContentUtils::AddScriptRunner(new ScriptErrorEvent(win, JS_GetRuntime(cx), xpcReport, exception));
|
||||
DispatchScriptErrorEvent(win, JS_GetRuntime(cx), xpcReport, exception);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DispatchScriptErrorEvent(nsPIDOMWindow *win, JSRuntime *rt, xpc::ErrorReport *xpcReport,
|
||||
JS::Handle<JS::Value> exception)
|
||||
{
|
||||
nsContentUtils::AddScriptRunner(new ScriptErrorEvent(win, rt, xpcReport, exception));
|
||||
}
|
||||
|
||||
} /* namespace xpc */
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -532,6 +532,10 @@ class ErrorReport {
|
|||
~ErrorReport() {}
|
||||
};
|
||||
|
||||
void
|
||||
DispatchScriptErrorEvent(nsPIDOMWindow *win, JSRuntime *rt, xpc::ErrorReport *xpcReport,
|
||||
JS::Handle<JS::Value> exception);
|
||||
|
||||
} // namespace xpc
|
||||
|
||||
namespace mozilla {
|
||||
|
|
Загрузка…
Ссылка в новой задаче