Bug 1344527 - Give up in ReadScriptAsync if we can't create a promise. r=bholley

MozReview-Commit-ID: Hq4vJZmfDpc

--HG--
extra : rebase_source : f3544bfc559aee379f66972ce97764354b6aa658
This commit is contained in:
Andrew McCreight 2017-03-09 09:24:28 -08:00
parent 682b54d712
commit 634490d4bf

View File

@ -415,7 +415,7 @@ mozJSSubScriptLoader::ReadScriptAsync(nsIURI* uri, JSObject* targetObjArg,
RefPtr<Promise> promise = Promise::Create(globalObject, result);
if (result.Failed()) {
promise = nullptr;
return result.StealNSResult();
}
DebugOnly<bool> asJS = ToJSValue(jsapi.cx(), promise, retval);