From 2488aa43f584e77779ce8fb00b50d1265adca67e Mon Sep 17 00:00:00 2001 From: Igor Sheludko Date: Thu, 21 Mar 2024 17:48:19 +0100 Subject: [PATCH] Don't use soon-to-be-deprecated V8 Api Namely v8::ObjectTemplate::SetAccessor(v8::Local, ...); See https://crrev.com/c/v8/v8/+/5344409 for details. --- src/base_object-inl.h | 4 ++-- src/base_object.h | 4 ++-- src/node_external_reference.h | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/base_object-inl.h b/src/base_object-inl.h index da8fed7b3013df..8b9d16868ff6c0 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -132,14 +132,14 @@ v8::EmbedderGraph::Node::Detachedness BaseObject::GetDetachedness() const { template void BaseObject::InternalFieldGet( - v8::Local property, + v8::Local property, const v8::PropertyCallbackInfo& info) { info.GetReturnValue().Set( info.This()->GetInternalField(Field).As()); } template -void BaseObject::InternalFieldSet(v8::Local property, +void BaseObject::InternalFieldSet(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) { // This could be e.g. value->IsFunction(). diff --git a/src/base_object.h b/src/base_object.h index b0ada1d7f38fed..fd6d62a99ce011 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -111,10 +111,10 @@ class BaseObject : public MemoryRetainer { // Setter/Getter pair for internal fields that can be passed to SetAccessor. template - static void InternalFieldGet(v8::Local property, + static void InternalFieldGet(v8::Local property, const v8::PropertyCallbackInfo& info); template - static void InternalFieldSet(v8::Local property, + static void InternalFieldSet(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info); diff --git a/src/node_external_reference.h b/src/node_external_reference.h index 8b47831769d5ec..f66bdf40c2a9f8 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -57,8 +57,6 @@ class ExternalReferenceRegistry { V(CFunctionWithBool) \ V(const v8::CFunctionInfo*) \ V(v8::FunctionCallback) \ - V(v8::AccessorGetterCallback) \ - V(v8::AccessorSetterCallback) \ V(v8::AccessorNameGetterCallback) \ V(v8::AccessorNameSetterCallback) \ V(v8::GenericNamedPropertyDefinerCallback) \