Skip to content

Commit

Permalink
Implement 'Eq' and 'PartialEq' traits for local handles (denoland#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Mar 6, 2020
1 parent 926f3a1 commit e1b59ec
Show file tree
Hide file tree
Showing 3 changed files with 651 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ v8::Value* v8__Local__New(v8::Isolate* isolate, v8::Value* other) {
return local_to_ptr(v8::Local<v8::Value>::New(isolate, ptr_to_local(other)));
}

bool v8__Local__EQ(v8::Local<void> self, v8::Local<void> other) {
return self == other;
}

v8::Value* v8__Global__New(v8::Isolate* isolate, v8::Value* other) {
// We have to use `std::move()` here because v8 disables the copy constructor
// for class `v8::Global`.
Expand Down
Loading

0 comments on commit e1b59ec

Please sign in to comment.