arrayBufferBytes property
JSTypedArrayBytes
arrayBufferBytes
Implementation
JSTypedArrayBytes get arrayBufferBytes {
final JSException exception1 = JSException.create(_context);
final JSException exception2 = JSException.create(_context);
try {
final Pointer<Void> bytes = js_bd.JSObjectGetArrayBufferBytesPtr(_context.ref, _ref, exception1.ref);
if (exception1.shouldThrow) {
throw exception1.error;
}
final int length = js_bd.JSObjectGetArrayBufferByteLength(_context.ref, _ref, exception2.ref);
if (exception2.shouldThrow) {
throw exception2.error;
}
return JSTypedArrayBytes(bytes, length);
} finally {
exception2.release();
exception1.release();
}
}