-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
addonsIssues and PRs related to native addons.Issues and PRs related to native addons.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
- Version: v6.9.1
- Platform: Win7 SP1, 64-Bit
- Subsystem:
There is an issue with the inheritance of native node addons in Node v6.9.1.
The problem doesn't exist with Node v4.6.1 or Node v7.0.0.
To reconstruct, i used the example code of Node docs (https://nodejs.org/dist/latest-v6.x/docs/api/addons.html#addons_wrapping_c_objects) and ran the code with this example:
"use strict";
const addon = require('./build/Release/addon');
class Test extends addon.MyObject {
constructor() {
super();
this.doOutput();
}
doOutput() {
console.log("hello world");
}
}
var obj = new Test();Result is:
TypeError: this.doOutput is not a function
The problem is, that the this is empty after super() call.
Metadata
Metadata
Assignees
Labels
addonsIssues and PRs related to native addons.Issues and PRs related to native addons.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.