From 78a88591f8c23598977ea590559a21a74884ca37 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 20 Sep 2018 12:13:39 -0400 Subject: [PATCH 1/2] 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 insted of ids to retrieve info about nodes). --- src/async_wrap.cc | 3 --- src/node_buffer.cc | 1 - 2 files changed, 4 deletions(-) diff --git a/src/async_wrap.cc b/src/async_wrap.cc index f697679399b7..b04ab6808704 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -556,9 +556,6 @@ AsyncWrap::AsyncWrap(Environment* env, CHECK_NE(provider, PROVIDER_NONE); CHECK_GE(object->InternalFieldCount(), 1); - // Shift provider value over to prevent id collision. - persistent().SetWrapperClassId(NODE_ASYNC_ID_OFFSET + provider_type_); - // Use AsyncReset() call to execute the init() callbacks. AsyncReset(execution_async_id, silent); } diff --git a/src/node_buffer.cc b/src/node_buffer.cc index dd285156b564..d23fb45b16c1 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -144,7 +144,6 @@ CallbackInfo::CallbackInfo(Isolate* isolate, CHECK_NOT_NULL(data_); persistent_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter); - persistent_.SetWrapperClassId(BUFFER_ID); isolate->AdjustAmountOfExternalAllocatedMemory(sizeof(*this)); } From 56473a644c145a3296d39fbe937e302613b88eb1 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 20 Sep 2018 15:27:19 -0400 Subject: [PATCH 2/2] fixup! src: remove calls to SetWrapperClassId() --- src/async_wrap.h | 2 -- src/node_buffer.cc | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/async_wrap.h b/src/async_wrap.h index b10676ce1d09..50864837d627 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -31,8 +31,6 @@ namespace node { -#define NODE_ASYNC_ID_OFFSET 0xA1C - #define NODE_ASYNC_NON_CRYPTO_PROVIDER_TYPES(V) \ V(NONE) \ V(DNSCHANNEL) \ diff --git a/src/node_buffer.cc b/src/node_buffer.cc index d23fb45b16c1..8642477db4d9 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -33,8 +33,6 @@ #include #include -#define BUFFER_ID 0xB0E4 - #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define THROW_AND_RETURN_UNLESS_BUFFER(env, obj) \