Skip to content

Commit 19852cc

Browse files
committed
fixup! esm: use sync loading/resolving on non-loader-hook thread
1 parent f9deee5 commit 19852cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/internal/modules/esm/loader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ class ModuleLoader {
190190
*/
191191
allowImportMetaResolve;
192192

193+
/**
194+
* @see {AsyncLoaderHooks.isForAsyncLoaderHookWorker}
195+
* Shortcut to this.#asyncLoaderHooks.isForAsyncLoaderHookWorker.
196+
*/
193197
isForAsyncLoaderHookWorker = false;
194198

195199
/**
@@ -533,7 +537,7 @@ class ModuleLoader {
533537
/**
534538
* Given a resolved module request, obtain a ModuleJobBase from it - if it's already cached,
535539
* return the cached ModuleJobBase. Otherwise, load its source and translate it into a ModuleWrap first.
536-
* This runs synchronously. On any thread that is not a async loader hook worker thread,
540+
* This runs synchronously. On any thread that is not an async loader hook worker thread,
537541
* the module should be linked by the time this returns. Otherwise it may still have
538542
* pending module requests.
539543
* @param {string} parentURL See {@link getOrCreateModuleJob}

0 commit comments

Comments
 (0)