Function js::jsapi::JS_NewArrayBufferWithExternalContents [] [src]

pub unsafe extern "C" fn JS_NewArrayBufferWithExternalContents(
    cx: *mut JSContext,
    nbytes: usize,
    contents: *mut c_void
) -> *mut JSObject

Create a new array buffer with the given contents. The array buffer does not take ownership of contents, and JS_DetachArrayBuffer must be called before the contents are disposed of.