Skip to content

Commit

Permalink
Revert "lib: remove unused NativeModule/NativeModule wraps"
Browse files Browse the repository at this point in the history
This reverts commit 0cde1a4.

PR-URL: nodejs#25446
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
joyeecheung authored and BridgeAR committed Jan 16, 2019
1 parent fd8e02c commit 252716e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/internal/bootstrap/loaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,15 @@
return NativeModule._source[id];
};

NativeModule.wrap = function(script) {
return NativeModule.wrapper[0] + script + NativeModule.wrapper[1];
};

NativeModule.wrapper = [
'(function (exports, require, module, process, internalBinding) {',
'\n});'
];

const getOwn = (target, property, receiver) => {
return ReflectApply(ObjectHasOwnProperty, target, [property]) ?
ReflectGet(target, property, receiver) :
Expand Down

0 comments on commit 252716e

Please sign in to comment.