node-webkit crashes when I create an ArrayBuffer inside c++ add-on

0 views
Skip to first unread message

Stefano Pacifici

unread,
Oct 4, 2013, 12:30:18 PM10/4/13
to node-...@googlegroups.com
Hi,
  I am looking for some help about the problem described in the subject.
I wrote the following example to prove my point:

#include <node.h>
#include <v8.h>
#include <cstring>

using namespace v8;

Handle<Value> createVector(const Arguments& args) {
  HandleScope scope;
  Handle<ArrayBuffer> a = ArrayBuffer::New(12);
  return scope.Close(a);
}

void init(Handle<Object> exports) {
  exports->Set(String::NewSymbol("createVector"),
      FunctionTemplate::New(createVector)->GetFunction());
}

NODE_MODULE(vectortest, init)

Every time I call the createVector() method node-webkit crashes on Windows 8.
I call it from the console using the following javascript code:

var m=require('vectortest');
m.createVector();

Any suggestion?

Reply all
Reply to author
Forward
0 new messages