/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
if (NS_FAILED(rv)) {
MOZ_ASSERT(!promise); return SendFailedAsyncOpen(rv);
}
}
RefPtr<DocumentChannelParent> self = this;
promise->Then(
GetCurrentSerialEventTarget(), __func__,
[self](DocumentLoadListener::OpenPromiseSucceededType&& aResolveValue) { // The DLL is waiting for us to resolve the // PDocumentChannel::RedirectToRealChannelPromise given as parameter. auto promise = self->RedirectToRealChannel(
std::move(aResolveValue.mStreamFilterEndpoints),
aResolveValue.mRedirectFlags, aResolveValue.mLoadFlags,
aResolveValue.mEarlyHintLinkType); // We chain the promise the DLL is waiting on to the one returned by // RedirectToRealChannel. As soon as the promise returned is resolved // or rejected, so will the DLL's promise.
promise->ChainTo(aResolveValue.mPromise.forget(), __func__);
self->mDocumentLoadListener = nullptr;
},
[self](DocumentLoadListener::OpenPromiseFailedType&& aRejectValue) { if (self->CanSend()) {
Unused << self->SendDisconnectChildListeners(
aRejectValue.mStatus, aRejectValue.mLoadGroupStatus,
aRejectValue.mContinueNavigating);
}
self->mDocumentLoadListener = nullptr;
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.