Skip to content

Commit 8726869

Browse files
authored
Don't use soon-to-be-deprecated V8 Api (#174)
Namely v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, ...); See https://crrev.com/c/v8/v8/+/5344409 for details.
1 parent 25196a6 commit 8726869

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/base_object-inl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ v8::EmbedderGraph::Node::Detachedness BaseObject::GetDetachedness() const {
132132

133133
template <int Field>
134134
void BaseObject::InternalFieldGet(
135-
v8::Local<v8::String> property,
135+
v8::Local<v8::Name> property,
136136
const v8::PropertyCallbackInfo<v8::Value>& info) {
137137
info.GetReturnValue().Set(
138138
info.This()->GetInternalField(Field).As<v8::Value>());
139139
}
140140

141141
template <int Field, bool (v8::Value::* typecheck)() const>
142-
void BaseObject::InternalFieldSet(v8::Local<v8::String> property,
142+
void BaseObject::InternalFieldSet(v8::Local<v8::Name> property,
143143
v8::Local<v8::Value> value,
144144
const v8::PropertyCallbackInfo<void>& info) {
145145
// This could be e.g. value->IsFunction().

src/base_object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ class BaseObject : public MemoryRetainer {
111111

112112
// Setter/Getter pair for internal fields that can be passed to SetAccessor.
113113
template <int Field>
114-
static void InternalFieldGet(v8::Local<v8::String> property,
114+
static void InternalFieldGet(v8::Local<v8::Name> property,
115115
const v8::PropertyCallbackInfo<v8::Value>& info);
116116
template <int Field, bool (v8::Value::*typecheck)() const>
117-
static void InternalFieldSet(v8::Local<v8::String> property,
117+
static void InternalFieldSet(v8::Local<v8::Name> property,
118118
v8::Local<v8::Value> value,
119119
const v8::PropertyCallbackInfo<void>& info);
120120

src/node_external_reference.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ class ExternalReferenceRegistry {
5757
V(CFunctionWithBool) \
5858
V(const v8::CFunctionInfo*) \
5959
V(v8::FunctionCallback) \
60-
V(v8::AccessorGetterCallback) \
61-
V(v8::AccessorSetterCallback) \
6260
V(v8::AccessorNameGetterCallback) \
6361
V(v8::AccessorNameSetterCallback) \
6462
V(v8::GenericNamedPropertyDefinerCallback) \

0 commit comments

Comments
 (0)