/* -*- 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/. */
// Mark a module as ready to execute. This means that this module and all it // dependencies have had their source loaded, parsed as a module and the // modules instantiated.
ScriptLoadRequest::SetReady();
if (mWaitingParentRequest) {
ChildLoadComplete(true);
}
}
void ModuleLoadRequest::ModuleLoaded() { // A module that was found to be marked as fetching in the module map has now // been loaded.
void ModuleLoadRequest::CancelImports() {
State origState = mState;
// To prevent reentering ModuleErrored() for this request via mImports[i]'s // ChildLoadComplete().
mState = State::CancelingImports;
for (size_t i = 0; i < mImports.Length(); i++) { if (mLoader->IsFetchingAndHasWaitingRequest(mImports[i])) {
LOG(("CancelImports import %p is fetching and has waiting\n",
mImports[i].get())); continue;
}
mImports[i]->Cancel();
}
void ModuleLoadRequest::ChildModuleUnlinked() { // This module was waiting for a child request, but the child reqeust // got unlinked by CC and will never complete. // It also means this module itself is also in the cycle, and will be // unlinked or has already been unlinked, and will be collected. // There's no need to normally finish the module request. // Just reflect the awaiting imports count, so that the assertion in the // destructor passes.
MOZ_ASSERT(mAwaitingImports > 0);
mAwaitingImports--;
}
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.