Function js::jsapi::JS_DetachArrayBuffer
[−]
[src]
pub unsafe extern "C" fn JS_DetachArrayBuffer(
cx: *mut JSContext,
obj: HandleObject,
changeData: DetachDataDisposition
) -> bool
Detach an ArrayBuffer, causing all associated views to no longer refer to the ArrayBuffer's original attached memory.
The |changeData| argument is a hint to inform internal behavior with respect to the ArrayBuffer's internal pointer to associated data. |ChangeData| attempts to set the internal pointer to fresh memory of the same size as the original memory; |KeepData| attempts to preserve the original pointer, even while the ArrayBuffer appears observably detached. There is no guarantee this parameter is respected -- it's only a hint.