mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix(napi): fix is_detached_arraybuffer (#16478)
This commit is contained in:
parent
59ac110edd
commit
207dd8d111
5 changed files with 52 additions and 4 deletions
|
@ -1798,9 +1798,7 @@ fn napi_is_detached_arraybuffer(
|
|||
) -> Result {
|
||||
let value = transmute::<napi_value, v8::Local<v8::Value>>(value);
|
||||
let _ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap();
|
||||
// TODO: what is API for checking if ArrayBuffer is detached?
|
||||
// there's only is_detachable I could find.
|
||||
*result = false;
|
||||
*result = _ab.was_detached();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue