diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 96d07331985..bdd2edce866 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -90,10 +90,6 @@ setupGlobalURL(); } - // Ensure setURLConstructor() is called before the native - // URL::ToObject() method is used. - NativeModule.require('internal/url'); - // On OpenBSD process.execPath will be relative unless we // get the full path before process.execPath is used. if (process.platform === 'openbsd') { diff --git a/lib/url.js b/lib/url.js index c517ba7ab3d..3a2c3c01ea1 100644 --- a/lib/url.js +++ b/lib/url.js @@ -30,6 +30,8 @@ const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes; +// This ensures setURLConstructor() is called before the native +// URL::ToObject() method is used. const { spliceOne } = require('internal/util'); // WHATWG URL implementation provided by internal/url