mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1214300 - AsyncErrorReporter doesn't use JSRuntime param., r=smaug
This commit is contained in:
parent
d880584251
commit
457a61c7ea
@ -189,11 +189,11 @@ nsScriptNameSpaceManager* GetNameSpaceManager();
|
||||
nsScriptNameSpaceManager* PeekNameSpaceManager();
|
||||
|
||||
// Runnable that's used to do async error reporting
|
||||
class AsyncErrorReporter : public nsRunnable
|
||||
class AsyncErrorReporter final : public nsRunnable
|
||||
{
|
||||
public:
|
||||
// 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)
|
||||
{}
|
||||
|
||||
|
@ -1231,8 +1231,7 @@ Promise::MaybeReportRejected()
|
||||
NS_WARNING("!!! Trying to report rejected Promise after MainThread shutdown");
|
||||
}
|
||||
if (mainThread) {
|
||||
nsRefPtr<AsyncErrorReporter> r =
|
||||
new AsyncErrorReporter(CycleCollectedJSRuntime::Get()->Runtime(), xpcReport);
|
||||
nsRefPtr<AsyncErrorReporter> r = new AsyncErrorReporter(xpcReport);
|
||||
mainThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
|
@ -338,8 +338,7 @@ public:
|
||||
xpcReport->Init(report.report(), report.message(),
|
||||
/* aIsChrome = */ false, /* aWindowID = */ 0);
|
||||
|
||||
nsRefPtr<AsyncErrorReporter> aer =
|
||||
new AsyncErrorReporter(CycleCollectedJSRuntime::Get()->Runtime(), xpcReport);
|
||||
nsRefPtr<AsyncErrorReporter> aer = new AsyncErrorReporter(xpcReport);
|
||||
NS_DispatchToMainThread(aer);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user