mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1030707 - Part 6: Replace AutoPushJSContext in RuntimeService::ResumeWorkersForWindow. r=bholley
This commit is contained in:
parent
95e7d08113
commit
3209951196
@ -2123,14 +2123,11 @@ RuntimeService::ResumeWorkersForWindow(nsPIDOMWindow* aWindow)
|
||||
GetWorkersForWindow(aWindow, workers);
|
||||
|
||||
if (!workers.IsEmpty()) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(aWindow);
|
||||
MOZ_ASSERT(sgo);
|
||||
|
||||
nsIScriptContext* scx = sgo->GetContext();
|
||||
|
||||
AutoPushJSContext cx(scx ?
|
||||
scx->GetNativeContext() :
|
||||
nsContentUtils::GetSafeJSContext());
|
||||
AutoJSAPI jsapi;
|
||||
if (NS_WARN_IF(!jsapi.InitWithLegacyErrorReporting(aWindow))) {
|
||||
return;
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
|
||||
for (uint32_t index = 0; index < workers.Length(); index++) {
|
||||
if (!workers[index]->SynchronizeAndResume(cx, aWindow)) {
|
||||
|
Loading…
Reference in New Issue
Block a user