From d8ba520622bc01f3487b4dd2344ad68c4f7b38b2 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 8 Dec 2018 22:06:46 +0800 Subject: [PATCH] lib: remove unused NativeModule/NativeModule wraps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now compile the native modules in C++ so these are no longer used. PR-URL: https://github.com/nodejs/node/pull/24904 Refs:https://github.com/joyeecheung/node/commit/ bd765d61d7425d82e80bdf2f4f27c0424221837b Reviewed-By: Michaƫl Zasso Reviewed-By: Gus Caplan Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Franziska Hinkelmann Backport-PR-URL: https://github.com/nodejs/node/pull/25446 --- lib/internal/bootstrap/loaders.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/internal/bootstrap/loaders.js b/lib/internal/bootstrap/loaders.js index dfe904857fa3e5..3f188bef506d02 100644 --- a/lib/internal/bootstrap/loaders.js +++ b/lib/internal/bootstrap/loaders.js @@ -257,15 +257,6 @@ NativeModule.getSource = function(id) { 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) :