0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-21 15:04:33 -05:00

Update ArrayBuffer::was_detached to not use OpenHandle (#1126)

In #1103, the `ArrayBuffer::was_detached` method was added to rusty_v8
to fill a gap in the C++ API, and it was implemented using the
internal `v8::Utils::OpenHandle`. Since then, a `WasDetached` method
was added to `ArrayBuffer` in V8 10.9. This PR updates the
implementation to use that.
This commit is contained in:
Andreu Botella 2022-11-21 12:47:12 +01:00 committed by GitHub
parent acba887fa4
commit d992c5056b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -832,7 +832,7 @@ bool v8__ArrayBuffer__IsDetachable(const v8::ArrayBuffer& self) {
}
bool v8__ArrayBuffer__WasDetached(const v8::ArrayBuffer& self) {
return v8::Utils::OpenHandle(&self)->was_detached();
return ptr_to_local(&self)->WasDetached();
}
void v8__ArrayBuffer__SetDetachKey(const v8::ArrayBuffer& self,