Bug 1256424 followup to actually address the review comments

This commit is contained in:
Boris Zbarsky 2016-03-14 20:53:36 -04:00
parent 3ff438ab43
commit ce7543e0ed
2 changed files with 2 additions and 3 deletions

View File

@ -9,12 +9,12 @@
#include "DOMError.h" #include "DOMError.h"
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#include "DOMCursor.h" #include "DOMCursor.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/ErrorResult.h" #include "mozilla/ErrorResult.h"
#include "mozilla/dom/Event.h" #include "mozilla/dom/Event.h"
#include "mozilla/dom/Promise.h" #include "mozilla/dom/Promise.h"
#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/ScriptSettings.h"
#include "jsfriendapi.h" #include "jsfriendapi.h"
#include "nsContentUtils.h"
using mozilla::dom::AnyCallback; using mozilla::dom::AnyCallback;
using mozilla::dom::DOMError; using mozilla::dom::DOMError;
@ -301,7 +301,7 @@ class FireSuccessAsyncTask : public nsRunnable
FireSuccessAsyncTask(DOMRequest* aRequest, FireSuccessAsyncTask(DOMRequest* aRequest,
const JS::Value& aResult) : const JS::Value& aResult) :
mReq(aRequest), mReq(aRequest),
mResult(CycleCollectedJSRuntime::Get()->Runtime(), aResult) mResult(nsContentUtils::RootingCxForThread(), aResult)
{ {
} }

View File

@ -1764,7 +1764,6 @@ public:
AutoJSAPI jsapi; AutoJSAPI jsapi;
if (!jsapi.Init(mValues)) { if (!jsapi.Init(mValues)) {
// Now what?
return; return;
} }
jsapi.TakeOwnershipOfErrorReporting(); jsapi.TakeOwnershipOfErrorReporting();