Bug 1333990: Follow-up: Use Promise& rather than OwningNonNull<Promise> for binding arguments. r=bz

MozReview-Commit-ID: 23aYwjCPJ6l

--HG--
extra : rebase_source : ccaa13b20a2e7a52395ccee1bc2ef8bcb39448cf
This commit is contained in:
Kris Maglione 2017-03-17 13:55:27 -07:00
parent f446374619
commit 4af9951cec
2 changed files with 4 additions and 5 deletions

View File

@ -10589,16 +10589,15 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(UnblockParsingPromiseHandler)
NS_IMPL_CYCLE_COLLECTING_RELEASE(UnblockParsingPromiseHandler)
already_AddRefed<Promise>
nsIDocument::BlockParsing(OwningNonNull<Promise> aPromise,
ErrorResult& aRv)
nsIDocument::BlockParsing(Promise& aPromise, ErrorResult& aRv)
{
RefPtr<Promise> resultPromise = Promise::Create(aPromise->GetParentObject(), aRv);
RefPtr<Promise> resultPromise = Promise::Create(aPromise.GetParentObject(), aRv);
if (aRv.Failed()) {
return nullptr;
}
RefPtr<PromiseNativeHandler> promiseHandler = new UnblockParsingPromiseHandler(this, resultPromise);
aPromise->AppendNativeHandler(promiseHandler);
aPromise.AppendNativeHandler(promiseHandler);
return resultPromise.forget();
}

View File

@ -2787,7 +2787,7 @@ public:
void ObsoleteSheet(const nsAString& aSheetURI, mozilla::ErrorResult& rv);
already_AddRefed<mozilla::dom::Promise> BlockParsing(mozilla::OwningNonNull<mozilla::dom::Promise> aPromise,
already_AddRefed<mozilla::dom::Promise> BlockParsing(mozilla::dom::Promise& aPromise,
mozilla::ErrorResult& aRv);
already_AddRefed<nsIURI> GetMozDocumentURIIfNotForErrorPages();