Hey everyone!

I am trying to pass an ArrayBuffer from JS to C++, and when I debug the 
"size" variable is 0. 
I do not understand what I am doing wrong, ultimately my goal is to be able 
to read and write the buffer, copy, etc.
Thank you!!

var api = require('../src/public/api')
api.Method(new ArrayBuffer([1, 2, 3, 4]))

void Method(const v8::FunctionCallbackInfo<v8::Value> &args)
{
CHECK_ARGS(args, args[0]->IsArrayBuffer());
uint32_t size = args[0]->Uint32Value();
}


-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/ed43b406-af94-49f1-94c2-47c09673379d%40googlegroups.com.

Reply via email to