@@ -41,6 +41,7 @@ const { ModuleWrap, kEvaluating, kEvaluated } = internalBinding('module_wrap');
4141const {
4242 urlToFilename,
4343} = require ( 'internal/modules/helpers' ) ;
44+ const { threadId } = require ( 'worker_threads' ) ;
4445let defaultResolve , defaultLoad , defaultLoadSync , importMetaInitializer ;
4546
4647/**
@@ -500,7 +501,7 @@ class ModuleLoader {
500501 */
501502 resolve ( originalSpecifier , parentURL , importAttributes ) {
502503 if ( this . #customizations) {
503- return this . #customizations. resolve ( originalSpecifier , parentURL , importAttributes ) ;
504+ return this . #customizations. resolve ( originalSpecifier , parentURL , importAttributes , threadId ) ;
504505 }
505506 const requestKey = this . #resolveCache. serializeKey ( originalSpecifier , importAttributes ) ;
506507 const cachedResult = this . #resolveCache. get ( requestKey , parentURL ) ;
@@ -622,7 +623,7 @@ class CustomizedModuleLoader {
622623 * @returns {{ format: string, url: URL['href'] } | undefined }
623624 */
624625 register ( originalSpecifier , parentURL , data , transferList ) {
625- return hooksProxy . makeSyncRequest ( 'register' , transferList , originalSpecifier , parentURL , data ) ;
626+ return hooksProxy . makeSyncRequest ( 'register' , transferList , originalSpecifier , parentURL , data , threadId ) ;
626627 }
627628
628629 /**
@@ -635,7 +636,7 @@ class CustomizedModuleLoader {
635636 * @returns {{ format: string, url: URL['href'] } }
636637 */
637638 resolve ( originalSpecifier , parentURL , importAttributes ) {
638- return hooksProxy . makeAsyncRequest ( 'resolve' , undefined , originalSpecifier , parentURL , importAttributes ) ;
639+ return hooksProxy . makeAsyncRequest ( 'resolve' , undefined , originalSpecifier , parentURL , importAttributes , threadId ) ;
639640 }
640641
641642 resolveSync ( originalSpecifier , parentURL , importAttributes ) {
0 commit comments