Skip to content

Commit cb3062a

Browse files
joyeecheungtargos
authored andcommitted
src: remove calls to SetWrapperClassId()
We have migrated from the deprecated RetainedObjectInfo API to the new EmbedderGraph API, so there is no need to take care of wrapper class ids anymore since they are dedicated to the deprecated API (the new API uses a graph instead of ids to retrieve info about nodes). PR-URL: #22975 Refs: #21741 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent ab032e4 commit cb3062a

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

‎src/async_wrap.cc‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,6 @@ AsyncWrap::AsyncWrap(Environment* env,
555555
CHECK_NE(provider, PROVIDER_NONE);
556556
CHECK_GE(object->InternalFieldCount(), 1);
557557

558-
// Shift provider value over to prevent id collision.
559-
persistent().SetWrapperClassId(NODE_ASYNC_ID_OFFSET + provider_type_);
560-
561558
// Use AsyncReset() call to execute the init() callbacks.
562559
AsyncReset(execution_async_id, silent);
563560
}

‎src/async_wrap.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
namespacenode{
3333

34-
#defineNODE_ASYNC_ID_OFFSET0xA1C
35-
3634
#defineNODE_ASYNC_NON_CRYPTO_PROVIDER_TYPES(V) \
3735
V(NONE) \
3836
V(DNSCHANNEL) \

‎src/node_buffer.cc‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
#include<string.h>
3434
#include<limits.h>
3535

36-
#defineBUFFER_ID0xB0E4
37-
3836
#defineMIN(a, b) ((a) < (b) ? (a) : (b))
3937

4038
#defineTHROW_AND_RETURN_UNLESS_BUFFER(env, obj) \
@@ -144,7 +142,6 @@ CallbackInfo::CallbackInfo(Isolate* isolate,
144142
CHECK_NOT_NULL(data_);
145143

146144
persistent_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
147-
persistent_.SetWrapperClassId(BUFFER_ID);
148145
isolate->AdjustAmountOfExternalAllocatedMemory(sizeof(*this));
149146
}
150147

0 commit comments

Comments
(0)