From 3b4a81565780b724841c2950513416f14ab95ff3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 12 Apr 2018 23:26:44 -0400 Subject: Bug 1453339 - Make it harder to mess up Promise::All. r=peterv, a=RyanVM MozReview-Commit-ID: UO4wssYHj7 --- dom/workers/ServiceWorkerEvents.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'dom/workers/ServiceWorkerEvents.cpp') diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp index 09b09a24b..780b2f5f8 100644 --- a/dom/workers/ServiceWorkerEvents.cpp +++ b/dom/workers/ServiceWorkerEvents.cpp @@ -948,10 +948,8 @@ ExtendableEvent::GetPromise() } JSContext* cx = jsapi.cx(); - GlobalObject global(cx, globalObj->GetGlobalJSObject()); - ErrorResult result; - RefPtr p = Promise::All(global, Move(mPromises), result); + RefPtr p = Promise::All(cx, Move(mPromises), result); if (NS_WARN_IF(result.MaybeSetPendingException(cx))) { return nullptr; } -- cgit v1.2.3