Skip to content

Commit 42a7eaf

Browse files
joyeecheungaddaleax
authored andcommitted
Revert "lib: remove unused NativeModule/NativeModule wraps"
This reverts commit 0cde1a4. PR-URL: #25446 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent f64e5ec commit 42a7eaf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/internal/bootstrap/loaders.js

+9
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@
252252
return NativeModule._source[id];
253253
};
254254

255+
NativeModule.wrap = function(script) {
256+
return NativeModule.wrapper[0] + script + NativeModule.wrapper[1];
257+
};
258+
259+
NativeModule.wrapper = [
260+
'(function (exports, require, module, process, internalBinding) {',
261+
'\n});'
262+
];
263+
255264
const getOwn = (target, property, receiver) => {
256265
return ReflectApply(ObjectHasOwnProperty, target, [property]) ?
257266
ReflectGet(target, property, receiver) :

0 commit comments

Comments
 (0)