Skip to content

Commit

Permalink
Update ArrayBuffer::was_detached to not use OpenHandle (denoland#…
Browse files Browse the repository at this point in the history
…1126)

In denoland#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.
  • Loading branch information
andreubotella committed Nov 21, 2022
1 parent acba887 commit d992c50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d992c50

Please sign in to comment.