Simon,
Thank you so much for your answer!
That makes perfect sense
On Sun, Sep 1, 2019 at 10:31 PM 'Simon Zünd' via v8-users <
v8-users@googlegroups.com> wrote:
> Hey,
>
> You are not accessing the "size" property, but treat "args[0]" as if it
> were a number (which it is not, it's a ArrayBuffer
Hey,
You are not accessing the "size" property, but treat "args[0]" as if it
were a number (which it is not, it's a ArrayBuffer). Since you have
established that args[0] is an ArrayBuffer, you can use cast, which would
look roughly like this:
Local array_buffer = Local::cast(args[0]);
size_t size
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 Arr