Skip to content

Commit 811f8c6

Browse files
committed
src: migrate from v8::PropertyCallbackInfo<void>
Signed-Off-By: Michaël Zasso <targos@protonmail.com>
1 parent b1a90ce commit 811f8c6

8 files changed

Lines changed: 32 additions & 30 deletions

src/node_contextify.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ Intercepted ContextifyContext::PropertyGetterCallback(
566566
Intercepted ContextifyContext::PropertySetterCallback(
567567
Local<Name> property,
568568
Local<Value> value,
569-
const PropertyCallbackInfo<void>& args) {
569+
const PropertyCallbackInfo<Boolean>& args) {
570570
ContextifyContext* ctx = ContextifyContext::Get(args);
571571

572572
// Still initializing
@@ -659,7 +659,7 @@ Intercepted ContextifyContext::PropertyDescriptorCallback(
659659
Intercepted ContextifyContext::PropertyDefinerCallback(
660660
Local<Name> property,
661661
const PropertyDescriptor& desc,
662-
const PropertyCallbackInfo<void>& args) {
662+
const PropertyCallbackInfo<Boolean>& args) {
663663
ContextifyContext* ctx = ContextifyContext::Get(args);
664664

665665
// Still initializing
@@ -868,7 +868,7 @@ Intercepted ContextifyContext::IndexedPropertyGetterCallback(
868868
Intercepted ContextifyContext::IndexedPropertySetterCallback(
869869
uint32_t index,
870870
Local<Value> value,
871-
const PropertyCallbackInfo<void>& args) {
871+
const PropertyCallbackInfo<Boolean>& args) {
872872
ContextifyContext* ctx = ContextifyContext::Get(args);
873873

874874
// Still initializing
@@ -897,7 +897,7 @@ Intercepted ContextifyContext::IndexedPropertyDescriptorCallback(
897897
Intercepted ContextifyContext::IndexedPropertyDefinerCallback(
898898
uint32_t index,
899899
const PropertyDescriptor& desc,
900-
const PropertyCallbackInfo<void>& args) {
900+
const PropertyCallbackInfo<Boolean>& args) {
901901
ContextifyContext* ctx = ContextifyContext::Get(args);
902902

903903
// Still initializing

src/node_contextify.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ class ContextifyContext final : CPPGC_MIXIN(ContextifyContext) {
153153
static v8::Intercepted PropertySetterCallback(
154154
v8::Local<v8::Name> property,
155155
v8::Local<v8::Value> value,
156-
const v8::PropertyCallbackInfo<void>& args);
156+
const v8::PropertyCallbackInfo<v8::Boolean>& args);
157157
static v8::Intercepted PropertyDescriptorCallback(
158158
v8::Local<v8::Name> property,
159159
const v8::PropertyCallbackInfo<v8::Value>& args);
160160
static v8::Intercepted PropertyDefinerCallback(
161161
v8::Local<v8::Name> property,
162162
const v8::PropertyDescriptor& desc,
163-
const v8::PropertyCallbackInfo<void>& args);
163+
const v8::PropertyCallbackInfo<v8::Boolean>& args);
164164
static v8::Intercepted PropertyDeleterCallback(
165165
v8::Local<v8::Name> property,
166166
const v8::PropertyCallbackInfo<v8::Boolean>& args);
@@ -173,13 +173,13 @@ class ContextifyContext final : CPPGC_MIXIN(ContextifyContext) {
173173
static v8::Intercepted IndexedPropertySetterCallback(
174174
uint32_t index,
175175
v8::Local<v8::Value> value,
176-
const v8::PropertyCallbackInfo<void>& args);
176+
const v8::PropertyCallbackInfo<v8::Boolean>& args);
177177
static v8::Intercepted IndexedPropertyDescriptorCallback(
178178
uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& args);
179179
static v8::Intercepted IndexedPropertyDefinerCallback(
180180
uint32_t index,
181181
const v8::PropertyDescriptor& desc,
182-
const v8::PropertyCallbackInfo<void>& args);
182+
const v8::PropertyCallbackInfo<v8::Boolean>& args);
183183
static v8::Intercepted IndexedPropertyDeleterCallback(
184184
uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& args);
185185
static void IndexedPropertyEnumeratorCallback(

src/node_env_var.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ static Intercepted EnvGetter(Local<Name> property,
450450

451451
static Intercepted EnvSetter(Local<Name> property,
452452
Local<Value> value,
453-
const PropertyCallbackInfo<void>& info) {
453+
const PropertyCallbackInfo<Boolean>& info) {
454454
Environment* env = Environment::GetCurrent(info);
455455
CHECK(env->has_run_bootstrapping_code());
456456
// calling env->EmitProcessEnvWarning() sets a variable indicating that
@@ -531,7 +531,7 @@ static void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
531531

532532
static Intercepted EnvDefiner(Local<Name> property,
533533
const PropertyDescriptor& desc,
534-
const PropertyCallbackInfo<void>& info) {
534+
const PropertyCallbackInfo<Boolean>& info) {
535535
Environment* env = Environment::GetCurrent(info);
536536
if (desc.has_value()) {
537537
if (!desc.has_writable() ||
@@ -581,7 +581,7 @@ static Intercepted EnvGetterIndexed(uint32_t index,
581581

582582
static Intercepted EnvSetterIndexed(uint32_t index,
583583
Local<Value> value,
584-
const PropertyCallbackInfo<void>& info) {
584+
const PropertyCallbackInfo<Boolean>& info) {
585585
Environment* env = Environment::GetCurrent(info);
586586
Local<Name> name = Uint32ToString(env->context(), index);
587587
return EnvSetter(name, value, info);
@@ -601,9 +601,10 @@ static Intercepted EnvDeleterIndexed(
601601
return EnvDeleter(name, info);
602602
}
603603

604-
static Intercepted EnvDefinerIndexed(uint32_t index,
605-
const PropertyDescriptor& desc,
606-
const PropertyCallbackInfo<void>& info) {
604+
static Intercepted EnvDefinerIndexed(
605+
uint32_t index,
606+
const PropertyDescriptor& desc,
607+
const PropertyCallbackInfo<Boolean>& info) {
607608
Environment* env = Environment::GetCurrent(info);
608609
Local<Name> name = Uint32ToString(env->context(), index);
609610
return EnvDefiner(name, desc, info);

src/node_external_reference.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ class ExternalReferenceRegistry {
2020
#define ALLOWED_EXTERNAL_REFERENCE_TYPES(V) \
2121
V(v8::FunctionCallback) \
2222
V(v8::AccessorNameGetterCallback) \
23-
V(v8::AccessorNameSetterCallback) \
23+
V(v8::AccessorNameSetterCallbackV2) \
2424
V(v8::NamedPropertyGetterCallback) \
25-
V(v8::NamedPropertyDefinerCallback) \
25+
V(v8::NamedPropertyDefinerCallbackV2) \
2626
V(v8::NamedPropertyDeleterCallback) \
2727
V(v8::NamedPropertyEnumeratorCallback) \
2828
V(v8::NamedPropertyQueryCallback) \
29-
V(v8::NamedPropertySetterCallback) \
30-
V(v8::IndexedPropertyGetterCallbackV2) \
31-
V(v8::IndexedPropertySetterCallbackV2) \
32-
V(v8::IndexedPropertyDefinerCallbackV2) \
33-
V(v8::IndexedPropertyDeleterCallbackV2) \
34-
V(v8::IndexedPropertyQueryCallbackV2) \
29+
V(v8::NamedPropertySetterCallbackV2) \
30+
V(v8::IndexedPropertyGetterCallback) \
31+
V(v8::IndexedPropertySetterCallback) \
32+
V(v8::IndexedPropertyDefinerCallback) \
33+
V(v8::IndexedPropertyDeleterCallback) \
34+
V(v8::IndexedPropertyQueryCallback) \
3535
V(const v8::String::ExternalStringResourceBase*)
3636

3737
#define V(ExternalReferenceType) \

src/node_process_object.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <climits> // PATH_MAX
1313

1414
namespace node {
15+
using v8::Boolean;
1516
using v8::Context;
1617
using v8::EscapableHandleScope;
1718
using v8::Function;
@@ -40,7 +41,7 @@ static void ProcessTitleGetter(Local<Name> property,
4041

4142
static void ProcessTitleSetter(Local<Name> property,
4243
Local<Value> value,
43-
const PropertyCallbackInfo<void>& info) {
44+
const PropertyCallbackInfo<Boolean>& info) {
4445
node::Utf8Value title(info.GetIsolate(), value);
4546
TRACE_EVENT_METADATA1(
4647
"__metadata", "process_name", "name", TRACE_STR_COPY(*title));
@@ -57,7 +58,7 @@ static void DebugPortGetter(Local<Name> property,
5758

5859
static void DebugPortSetter(Local<Name> property,
5960
Local<Value> value,
60-
const PropertyCallbackInfo<void>& info) {
61+
const PropertyCallbackInfo<Boolean>& info) {
6162
Environment* env = Environment::GetCurrent(info);
6263
int32_t port = value->Int32Value(env->context()).FromMaybe(0);
6364

src/node_sqlite.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ Intercepted DatabaseSyncLimits::LimitsGetter(
774774
Intercepted DatabaseSyncLimits::LimitsSetter(
775775
Local<Name> property,
776776
Local<Value> value,
777-
const PropertyCallbackInfo<void>& info) {
777+
const PropertyCallbackInfo<Boolean>& info) {
778778
if (!property->IsString()) {
779779
return Intercepted::kNo;
780780
}

src/node_sqlite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class DatabaseSyncLimits : public BaseObject {
433433
static v8::Intercepted LimitsSetter(
434434
v8::Local<v8::Name> property,
435435
v8::Local<v8::Value> value,
436-
const v8::PropertyCallbackInfo<void>& info);
436+
const v8::PropertyCallbackInfo<v8::Boolean>& info);
437437
static v8::Intercepted LimitsQuery(
438438
v8::Local<v8::Name> property,
439439
const v8::PropertyCallbackInfo<v8::Integer>& info);

src/node_webstorage.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static Intercepted StorageGetter(Local<Name> property,
598598

599599
static Intercepted StorageSetter(Local<Name> property,
600600
Local<Value> value,
601-
const PropertyCallbackInfo<void>& info) {
601+
const PropertyCallbackInfo<Boolean>& info) {
602602
Storage* storage;
603603
ASSIGN_OR_RETURN_UNWRAP(&storage, info.Holder(), Intercepted::kNo);
604604

@@ -648,7 +648,7 @@ static void StorageEnumerator(const PropertyCallbackInfo<Array>& info) {
648648

649649
static Intercepted StorageDefiner(Local<Name> property,
650650
const PropertyDescriptor& desc,
651-
const PropertyCallbackInfo<void>& info) {
651+
const PropertyCallbackInfo<Boolean>& info) {
652652
Storage* storage;
653653
ASSIGN_OR_RETURN_UNWRAP(&storage, info.Holder(), Intercepted::kNo);
654654

@@ -668,7 +668,7 @@ static Intercepted IndexedGetter(uint32_t index,
668668

669669
static Intercepted IndexedSetter(uint32_t index,
670670
Local<Value> value,
671-
const PropertyCallbackInfo<void>& info) {
671+
const PropertyCallbackInfo<Boolean>& info) {
672672
Environment* env = Environment::GetCurrent(info);
673673
Local<Name> name = Uint32ToString(env->context(), index);
674674
return StorageSetter(name, value, info);
@@ -690,7 +690,7 @@ static Intercepted IndexedDeleter(uint32_t index,
690690

691691
static Intercepted IndexedDefiner(uint32_t index,
692692
const PropertyDescriptor& desc,
693-
const PropertyCallbackInfo<void>& info) {
693+
const PropertyCallbackInfo<Boolean>& info) {
694694
Environment* env = Environment::GetCurrent(info);
695695
Local<Name> name = Uint32ToString(env->context(), index);
696696
return StorageDefiner(name, desc, info);

0 commit comments

Comments
 (0)