зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1214300 - AsyncErrorReporter doesn't use JSRuntime param., r=smaug
This commit is contained in:
Родитель
1065049ddb
Коммит
0d7595b59b
|
@ -189,11 +189,11 @@ nsScriptNameSpaceManager* GetNameSpaceManager();
|
||||||
nsScriptNameSpaceManager* PeekNameSpaceManager();
|
nsScriptNameSpaceManager* PeekNameSpaceManager();
|
||||||
|
|
||||||
// Runnable that's used to do async error reporting
|
// Runnable that's used to do async error reporting
|
||||||
class AsyncErrorReporter : public nsRunnable
|
class AsyncErrorReporter final : public nsRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// aWindow may be null if this error report is not associated with a window
|
// aWindow may be null if this error report is not associated with a window
|
||||||
AsyncErrorReporter(JSRuntime* aRuntime, xpc::ErrorReport* aReport)
|
explicit AsyncErrorReporter(xpc::ErrorReport* aReport)
|
||||||
: mReport(aReport)
|
: mReport(aReport)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
@ -1231,8 +1231,7 @@ Promise::MaybeReportRejected()
|
||||||
NS_WARNING("!!! Trying to report rejected Promise after MainThread shutdown");
|
NS_WARNING("!!! Trying to report rejected Promise after MainThread shutdown");
|
||||||
}
|
}
|
||||||
if (mainThread) {
|
if (mainThread) {
|
||||||
nsRefPtr<AsyncErrorReporter> r =
|
nsRefPtr<AsyncErrorReporter> r = new AsyncErrorReporter(xpcReport);
|
||||||
new AsyncErrorReporter(CycleCollectedJSRuntime::Get()->Runtime(), xpcReport);
|
|
||||||
mainThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
mainThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,8 +338,7 @@ public:
|
||||||
xpcReport->Init(report.report(), report.message(),
|
xpcReport->Init(report.report(), report.message(),
|
||||||
/* aIsChrome = */ false, /* aWindowID = */ 0);
|
/* aIsChrome = */ false, /* aWindowID = */ 0);
|
||||||
|
|
||||||
nsRefPtr<AsyncErrorReporter> aer =
|
nsRefPtr<AsyncErrorReporter> aer = new AsyncErrorReporter(xpcReport);
|
||||||
new AsyncErrorReporter(CycleCollectedJSRuntime::Get()->Runtime(), xpcReport);
|
|
||||||
NS_DispatchToMainThread(aer);
|
NS_DispatchToMainThread(aer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче