Skip to content

Commit f7df436

Browse files
authored
Merge pull request #134 from lightpanda-io/global_equality
expose global == local overload
2 parents e616f2e + 2a79988 commit f7df436

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/binding.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,12 @@ const v8::Data* v8__Global__Get(
16211621
return local_to_ptr(self->Get(isolate));
16221622
}
16231623

1624+
bool v8__Global__IsEqual(
1625+
const v8::Global<v8::Data>* self,
1626+
const v8::Data* other) {
1627+
return *self == ptr_to_local(other);
1628+
}
1629+
16241630
// Eternal
16251631

16261632
void v8__Eternal__New(

src/binding.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,9 @@ void v8__Global__SetWeakFinalizer(
895895
const Data* v8__Global__Get(
896896
const Global* self,
897897
Isolate* isolate);
898+
bool v8__Global__IsEqual(
899+
const Global* self,
900+
const Data*);
898901

899902
// Eternal
900903
typedef struct Eternal {

0 commit comments

Comments
 (0)