Creates a new ArrayBuffer from existing data in memory.
The data is not copied: while this allows sharing data with JavaScript
efficiently, the caller must ensure that the memory region remains valid
until the newly created object is released by JSC.
Optionally, a destroy_notify callback can be provided, which will be
invoked with user_data as parameter when the ArrayBuffer object is
released. This is intended to be used for freeing resources related to
the memory region which contains the data:
Creates a new ArrayBuffer from existing data in memory.
The data is not copied: while this allows sharing data with JavaScript efficiently, the caller must ensure that the memory region remains valid until the newly created object is released by JSC.
Optionally, a destroy_notify callback can be provided, which will be invoked with user_data as parameter when the ArrayBuffer object is released. This is intended to be used for freeing resources related to the memory region which contains the data:
Note that the user_data can be the same value as data: