mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
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:
parent
f446374619
commit
4af9951cec
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user