Skip to content

Commit

Permalink
src: remove MarkIndependent() calls
Browse files Browse the repository at this point in the history
The method has been deprecated in upstream V8, with messaging
indicating that it is the default for handles to be independent
now anyway.

PR-URL: #20108
Refs: v8/v8@71ad48f
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
addaleax authored and jasnell committed Apr 23, 2018
1 parent 881fca4 commit 80c46c1
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/base_object-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ inline void BaseObject::MakeWeak(Type* ptr) {
v8::Local<v8::Object> handle = object();
CHECK_GT(handle->InternalFieldCount(), 0);
Wrap(handle, ptr);
persistent_handle_.MarkIndependent();
persistent_handle_.SetWeak<Type>(ptr, WeakCallback<Type>,
v8::WeakCallbackType::kParameter);
}
Expand Down
2 changes: 0 additions & 2 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ class Reference : private Finalizer {
if (initial_refcount == 0) {
_persistent.SetWeak(
this, FinalizeCallback, v8::WeakCallbackType::kParameter);
_persistent.MarkIndependent();
}
}

Expand Down Expand Up @@ -431,7 +430,6 @@ class Reference : private Finalizer {
if (--_refcount == 0) {
_persistent.SetWeak(
this, FinalizeCallback, v8::WeakCallbackType::kParameter);
_persistent.MarkIndependent();
}

return _refcount;
Expand Down
1 change: 0 additions & 1 deletion src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ CallbackInfo::CallbackInfo(Isolate* isolate,

persistent_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
persistent_.SetWrapperClassId(BUFFER_ID);
persistent_.MarkIndependent();
isolate->AdjustAmountOfExternalAllocatedMemory(sizeof(*this));
}

Expand Down
1 change: 0 additions & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ ContextifyContext::ContextifyContext(
if (context_.IsEmpty())
return;
context_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
context_.MarkIndependent();
}


Expand Down
1 change: 0 additions & 1 deletion src/node_object_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class ObjectWrap {

inline void MakeWeak(void) {
persistent().SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
persistent().MarkIndependent();
}

/* Ref() marks the object as being attached to an event loop.
Expand Down

0 comments on commit 80c46c1

Please sign in to comment.