@@ -92,12 +92,13 @@ void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) {
92
92
#define VS (PropertyName, StringValue ) V(String, PropertyName)
93
93
#define V (TypeName, PropertyName ) \
94
94
do { \
95
- MaybeLocal<TypeName> field = \
95
+ MaybeLocal<TypeName> maybe_field = \
96
96
isolate_->GetDataFromSnapshotOnce <TypeName>((*indexes)[i++]); \
97
- if (field.IsEmpty ()) { \
97
+ Local<TypeName> field; \
98
+ if (!maybe_field.ToLocal (&field)) { \
98
99
fprintf (stderr, " Failed to deserialize " #PropertyName " \n " ); \
99
100
} \
100
- PropertyName##_.Set (isolate_, field. ToLocalChecked ()); \
101
+ PropertyName##_.Set (isolate_, field); \
101
102
} while (0 );
102
103
PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES (VP)
103
104
PER_ISOLATE_SYMBOL_PROPERTIES (VY)
@@ -108,12 +109,13 @@ void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) {
108
109
#undef VP
109
110
110
111
for (size_t j = 0 ; j < AsyncWrap::PROVIDERS_LENGTH; j++) {
111
- MaybeLocal<String> field =
112
+ MaybeLocal<String> maybe_field =
112
113
isolate_->GetDataFromSnapshotOnce <String>((*indexes)[i++]);
113
- if (field.IsEmpty ()) {
114
+ Local<String> field;
115
+ if (!maybe_field.ToLocal (&field)) {
114
116
fprintf (stderr, " Failed to deserialize AsyncWrap provider %zu\n " , j);
115
117
}
116
- async_wrap_providers_[j].Set (isolate_, field. ToLocalChecked () );
118
+ async_wrap_providers_[j].Set (isolate_, field);
117
119
}
118
120
}
119
121
0 commit comments