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: #25446
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
joyeecheung authored and addaleax committed Jan 14, 2019
1 parent f64e5ec commit 42a7eaf
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 42a7eaf

Please sign in to comment.