mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 04:17:31 +09:00
Issue #618 - Add clarifying code comments.
This commit is contained in:
parent
27f4d0b5a5
commit
336347212b
2 changed files with 12 additions and 0 deletions
|
|
@ -52,6 +52,14 @@ void ModuleLoadRequest::Cancel()
|
||||||
void
|
void
|
||||||
ModuleLoadRequest::SetReady()
|
ModuleLoadRequest::SetReady()
|
||||||
{
|
{
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
// The mReady promise is used to ensure that when all dependencies of a module
|
||||||
|
// have become ready, DependenciesLoaded is called on that module
|
||||||
|
// request. This is set up in StartFetchingModuleDependencies.
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
for (size_t i = 0; i < mImports.Length(); i++) {
|
for (size_t i = 0; i < mImports.Length(); i++) {
|
||||||
MOZ_ASSERT(mImports[i]->IsReadyToRun());
|
MOZ_ASSERT(mImports[i]->IsReadyToRun());
|
||||||
|
|
|
||||||
|
|
@ -420,6 +420,10 @@ ScriptLoader::SetModuleFetchFinishedAndResumeWaitingRequests(ModuleLoadRequest *
|
||||||
{
|
{
|
||||||
// Update module map with the result of fetching a single module script. The
|
// Update module map with the result of fetching a single module script. The
|
||||||
// module script pointer is nullptr on error.
|
// module script pointer is nullptr on error.
|
||||||
|
//
|
||||||
|
// If any requests for the same URL are waiting on this one to complete, they
|
||||||
|
// will have ModuleLoaded or LoadFailed on them when the promise is
|
||||||
|
// resolved/rejected. This is set up in StartLoad.
|
||||||
|
|
||||||
MOZ_ASSERT(!aRequest->IsReadyToRun());
|
MOZ_ASSERT(!aRequest->IsReadyToRun());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue