From ce7543e0ede8c72a6ee82f935664f70485f0da7f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 14 Mar 2016 20:53:36 -0400 Subject: [PATCH] Bug 1256424 followup to actually address the review comments --- dom/base/DOMRequest.cpp | 4 ++-- dom/promise/Promise.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dom/base/DOMRequest.cpp b/dom/base/DOMRequest.cpp index 103b98618528..68708cbc5b85 100644 --- a/dom/base/DOMRequest.cpp +++ b/dom/base/DOMRequest.cpp @@ -9,12 +9,12 @@ #include "DOMError.h" #include "nsThreadUtils.h" #include "DOMCursor.h" -#include "mozilla/CycleCollectedJSRuntime.h" #include "mozilla/ErrorResult.h" #include "mozilla/dom/Event.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/ScriptSettings.h" #include "jsfriendapi.h" +#include "nsContentUtils.h" using mozilla::dom::AnyCallback; using mozilla::dom::DOMError; @@ -301,7 +301,7 @@ class FireSuccessAsyncTask : public nsRunnable FireSuccessAsyncTask(DOMRequest* aRequest, const JS::Value& aResult) : mReq(aRequest), - mResult(CycleCollectedJSRuntime::Get()->Runtime(), aResult) + mResult(nsContentUtils::RootingCxForThread(), aResult) { } diff --git a/dom/promise/Promise.cpp b/dom/promise/Promise.cpp index d15b499af00c..652ca492250c 100644 --- a/dom/promise/Promise.cpp +++ b/dom/promise/Promise.cpp @@ -1764,7 +1764,6 @@ public: AutoJSAPI jsapi; if (!jsapi.Init(mValues)) { - // Now what? return; } jsapi.TakeOwnershipOfErrorReporting();