Skip to content

Commit c5630e2

Browse files
daeyeondanielleadams
authored andcommitted
src,node-api: update napi_is_detached_arraybuffer
This gets `napi_is_detached_arraybuffer(..)` to use the new API, `ArrayBuffer::WasDetached`, that looks more straightforward. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45538 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 610341f commit c5630e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js_native_api_v8.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3254,7 +3254,7 @@ napi_status NAPI_CDECL napi_is_detached_arraybuffer(napi_env env,
32543254
v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(arraybuffer);
32553255

32563256
*result =
3257-
value->IsArrayBuffer() && value.As<v8::ArrayBuffer>()->Data() == nullptr;
3257+
value->IsArrayBuffer() && value.As<v8::ArrayBuffer>()->WasDetached();
32583258

32593259
return napi_clear_last_error(env);
32603260
}

0 commit comments

Comments
 (0)