Skip to content

Commit b16ee1f

Browse files
targosnodejs-github-bot
authored andcommitted
src: migrate from v8::PropertyCallbackInfo<void>
Signed-Off-By: Michaël Zasso <targos@protonmail.com>
1 parent 1f1e2b5 commit b16ee1f

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
@@ -867,7 +867,7 @@ Intercepted ContextifyContext::IndexedPropertyGetterCallback(
867867
Intercepted ContextifyContext::IndexedPropertySetterCallback(
868868
uint32_t index,
869869
Local<Value> value,
870-
const PropertyCallbackInfo<void>& args) {
870+
const PropertyCallbackInfo<Boolean>& args) {
871871
ContextifyContext* ctx = ContextifyContext::Get(args);
872872

873873
// Still initializing
@@ -896,7 +896,7 @@ Intercepted ContextifyContext::IndexedPropertyDescriptorCallback(
896896
Intercepted ContextifyContext::IndexedPropertyDefinerCallback(
897897
uint32_t index,
898898
const PropertyDescriptor& desc,
899-
const PropertyCallbackInfo<void>& args) {
899+
const PropertyCallbackInfo<Boolean>& args) {
900900
ContextifyContext* ctx = ContextifyContext::Get(args);
901901

902902
// 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
@@ -784,7 +784,7 @@ Intercepted DatabaseSyncLimits::LimitsGetter(
784784
Intercepted DatabaseSyncLimits::LimitsSetter(
785785
Local<Name> property,
786786
Local<Value> value,
787-
const PropertyCallbackInfo<void>& info) {
787+
const PropertyCallbackInfo<Boolean>& info) {
788788
if (!property->IsString()) {
789789
return Intercepted::kNo;
790790
}

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
@@ -599,7 +599,7 @@ static Intercepted StorageGetter(Local<Name> property,
599599

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

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

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

@@ -669,7 +669,7 @@ static Intercepted IndexedGetter(uint32_t index,
669669

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

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

0 commit comments

Comments
 (0)