Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…e#11629 has been fixed.
  • Loading branch information
FranckFreiburger committed Nov 13, 2018
1 parent 55bfef1 commit 221cb89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ function createProxy(mod) {
if ( property === Symbol.toPrimitive )
return toPrimitive(mod._exports);

// see http://stackoverflow.com/questions/42496414/illegal-invocation-error-using-es6-proxy-and-node-js
// see https://github.com/nodejs/node/issues/11629 (Illegal invocation error using ES6 Proxy and node.js)
// see http://stackoverflow.com/questions/42594682/how-to-determine-that-a-javascript-function-is-native-without-testing-native
// see V8 issue https://bugs.chromium.org/p/v8/issues/detail?id=5773

var val = Reflect.get(mod._exports, property);

if ( typeof(val) === 'function' && !('prototype' in val) ) { // native function has prototype === undefined
Expand Down
4 changes: 2 additions & 2 deletions test/native.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('native module', function() {


// see V8 issue https://bugs.chromium.org/p/v8/issues/detail?id=5773
xit('os.cpus', function() {
it('os.cpus', function() {

var mod = new utils.TmpModule(`
module.invalidable = true;
Expand All @@ -30,7 +30,7 @@ describe('native module', function() {
assert.equal(typeof mod.module.exports.cpus(), 'object');
});

xit('os.userInfo', function() {
it('os.userInfo', function() {

var mod = new utils.TmpModule(`
module.invalidable = true;
Expand Down

0 comments on commit 221cb89

Please sign in to comment.