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 --- layout/style/FontFaceSet.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'layout/style/FontFaceSet.cpp') diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp index 59626fba4..550a7d71a 100644 --- a/layout/style/FontFaceSet.cpp +++ b/layout/style/FontFaceSet.cpp @@ -343,17 +343,7 @@ FontFaceSet::Load(JSContext* aCx, } } - nsIGlobalObject* globalObject = GetParentObject(); - if (!globalObject) { - aRv.Throw(NS_ERROR_FAILURE); - return nullptr; - } - - JS::Rooted jsGlobal(aCx, globalObject->GetGlobalJSObject()); - GlobalObject global(aCx, jsGlobal); - - RefPtr result = Promise::All(global, promises, aRv); - return result.forget(); + return Promise::All(aCx, promises, aRv); } bool -- cgit v1.2.3