Skip to content

Commit b72a615

Browse files
gahaasvictorgomes
authored andcommitted
Fix calls to Object::wrap
1 parent 9f5180f commit b72a615

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/env.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ IsolateData::~IsolateData() {}
617617
// Deprecated API, embedders should use v8::Object::Wrap() directly instead.
618618
void SetCppgcReference(Isolate* isolate,
619619
Local<Object> object,
620-
void* wrappable) {
620+
v8::Object::Wrappable* wrappable) {
621621
v8::Object::Wrap<v8::CppHeapPointerTag::kDefaultTag>(
622622
isolate, object, wrappable);
623623
}

src/node.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,9 +1567,10 @@ void RegisterSignalHandler(int signal,
15671567
// work with only Node.js versions with v8::Object::Wrap() should use that
15681568
// instead.
15691569
NODE_DEPRECATED("Use v8::Object::Wrap()",
1570-
NODE_EXTERN void SetCppgcReference(v8::Isolate* isolate,
1571-
v8::Local<v8::Object> object,
1572-
void* wrappable));
1570+
NODE_EXTERN void SetCppgcReference(
1571+
v8::Isolate* isolate,
1572+
v8::Local<v8::Object> object,
1573+
v8::Object::Wrappable* wrappable));
15731574

15741575
} // namespace node
15751576

test/addons/cppgc-object/binding.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <v8.h>
99
#include <algorithm>
1010

11-
class CppGCed : public cppgc::GarbageCollected<CppGCed> {
11+
class CppGCed : public v8::Object::Wrappable {
1212
public:
1313
static uint16_t states[2];
1414
static constexpr int kDestructCount = 0;

test/cctest/test_cppgc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// This tests that Node.js can work with an existing CppHeap.
1111

1212
// Mimic a class that does not know about Node.js.
13-
class CppGCed : public cppgc::GarbageCollected<CppGCed> {
13+
class CppGCed : public v8::Object::Wrappable {
1414
public:
1515
static int kConstructCount;
1616
static int kDestructCount;

0 commit comments

Comments
 (0)