/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
ParentToChildServiceWorkerFetchEventOpArgs copyArgs(aArgs.common(), Nothing(),
Nothing(), Nothing()); if (aArgs.preloadResponse().isSome()) { // Convert the preload response to ParentToChildInternalResponse.
copyArgs.preloadResponse() =
Some(ToParentToChild(aArgs.preloadResponse().ref()));
}
if (aArgs.preloadResponseTiming().isSome()) {
copyArgs.preloadResponseTiming() = aArgs.preloadResponseTiming();
}
if (aArgs.preloadResponseEndArgs().isSome()) {
copyArgs.preloadResponseEndArgs() = aArgs.preloadResponseEndArgs();
}
RefPtr<FetchEventOpProxyParent> actor = new FetchEventOpProxyParent(std::move(aReal), std::move(aPromise));
// As long as the fetch event was pending, the FetchEventOpParent was // responsible for keeping the preload response, if it already arrived. Once // the fetch event starts it gives up the preload response (if any) and we // need to add it to the arguments. Note that we have to make sure that the // arguments don't contain the preload response already, otherwise we'll end // up overwriting it with a Nothing. auto [preloadResponse, preloadResponseEndArgs] =
actor->mReal->OnStart(WrapNotNull(actor)); if (copyArgs.preloadResponse().isNothing() && preloadResponse.isSome()) {
copyArgs.preloadResponse() = Some(ToParentToChild(preloadResponse.ref()));
} if (copyArgs.preloadResponseEndArgs().isNothing() &&
preloadResponseEndArgs.isSome()) {
copyArgs.preloadResponseEndArgs() = preloadResponseEndArgs;
}
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.