mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: remove MarkIndependent() calls
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: https://github.com/nodejs/node/pull/20108
Refs: 71ad48fb8f
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>
This commit is contained in:
committed by
Anatoli Papirovski
parent
aaea70693e
commit
1f3fbd43b7
@@ -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);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,6 @@ class Reference : private Finalizer {
|
||||
if (initial_refcount == 0) {
|
||||
_persistent.SetWeak(
|
||||
this, FinalizeCallback, v8::WeakCallbackType::kParameter);
|
||||
_persistent.MarkIndependent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,7 +430,6 @@ class Reference : private Finalizer {
|
||||
if (--_refcount == 0) {
|
||||
_persistent.SetWeak(
|
||||
this, FinalizeCallback, v8::WeakCallbackType::kParameter);
|
||||
_persistent.MarkIndependent();
|
||||
}
|
||||
|
||||
return _refcount;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@ ContextifyContext::ContextifyContext(
|
||||
if (context_.IsEmpty())
|
||||
return;
|
||||
context_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
|
||||
context_.MarkIndependent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user