-
-
Couldn't load subscription status.
- Fork 33.6k
Closed
Labels
questionIssues that look for answers.Issues that look for answers.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
Hello,
I am unable to call a node.js native function through a No-op forwarding proxy.
The following case works properly with a v8 native function:
var p = new Proxy(Math, {});
console.log( p.cos.toString() ); // function cos() { [native code] }
console.log( p.cos(0) ); // 1
Whereas the following case throw TypeError: Illegal invocation
var p = new Proxy(require('os'), {});
console.log( p.cpus.toString() ); // function getCPUs() { [native code] }
console.log( p.cpus() ); // TypeError: Illegal invocation
what's wrong ?
Metadata
Metadata
Assignees
Labels
questionIssues that look for answers.Issues that look for answers.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.