diff options
-rw-r--r-- | lib/internal/bootstrap/node.js | 4 | ||||
-rw-r--r-- | lib/internal/domexception.js | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 98d4b3c1d9..67093089f7 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -566,7 +566,9 @@ function setupDOMException() { // Registers the constructor with C++. - NativeModule.require('internal/domexception'); + const DOMException = NativeModule.require('internal/domexception'); + const { registerDOMException } = internalBinding('messaging'); + registerDOMException(DOMException); } function setupInspector(originalConsole, wrappedConsole) { diff --git a/lib/internal/domexception.js b/lib/internal/domexception.js index 3f9d3f3601..9845919e49 100644 --- a/lib/internal/domexception.js +++ b/lib/internal/domexception.js @@ -1,6 +1,5 @@ 'use strict'; -const { registerDOMException } = internalBinding('messaging'); const { ERR_INVALID_THIS } = require('internal/errors').codes; const internalsMap = new WeakMap(); @@ -85,5 +84,3 @@ for (const [name, codeName, value] of [ } module.exports = DOMException; - -registerDOMException(DOMException); |