Skip to content

Commit 42507e6

Browse files
daeyeonruyadorno
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 <[email protected]> PR-URL: #45538 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 81f63c2 commit 42507e6

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)