Skip to content

Inheritance #10

@Kagami

Description

@Kagami

Hi. Thank you for a such a great library.
I have an issue when trying to inherit Int64 class.

Code:

var inherits = require("util").inherits;
var _Int64 = require("int64-native");

function Int64() {
  Int64.super_.apply(this, arguments);
};
inherits(Int64, _Int64);

console.log(new _Int64(123).toNumber());
console.log(new Int64(123).toNumber());

Output:

$ node 1.js
123
node: /home/user/.node-gyp/0.10.33/src/node_object_wrap.h:71: void node::ObjectWrap::Wrap(v8::Handle<v8::Object>): Assertion `handle->InternalFieldCount() > 0' failed.
zsh: abort      node 1.js

I need inheritance in order to add some new methods to prototype (similar to mentioned in #9). Am I doing something wrong? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions