* @see AsyncLoaderHooks.register * @returns {any}
(specifier, parentURL, data, transferList, isInternal)
| 657 | * @returns {any} |
| 658 | */ |
| 659 | register(specifier, parentURL, data, transferList, isInternal) { |
| 660 | if (!this.#asyncLoaderHooks) { |
| 661 | // On the loader hook worker thread, the #asyncLoaderHooks must already have been initialized |
| 662 | // to be an instance of AsyncLoaderHooksOnLoaderHookWorker, so this branch can only ever |
| 663 | // be hit on a non-loader-hook thread that will talk to the loader hook worker thread. |
| 664 | const { AsyncLoaderHooksProxiedToLoaderHookWorker } = require('internal/modules/esm/hooks'); |
| 665 | this.#setAsyncLoaderHooks(new AsyncLoaderHooksProxiedToLoaderHookWorker()); |
| 666 | } |
| 667 | return this.#asyncLoaderHooks.register(`${specifier}`, `${parentURL}`, data, transferList, isInternal); |
| 668 | } |
| 669 | |
| 670 | /** |
| 671 | * Resolve a module request to a URL identifying the location of the module. Handles customization hooks, |
no test coverage detected