Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) {
#define VS(PropertyName, StringValue) V(String, PropertyName)
#define V(TypeName, PropertyName) \
do { \
MaybeLocal<TypeName> field = \
MaybeLocal<TypeName> maybe_field = \
isolate_->GetDataFromSnapshotOnce<TypeName>((*indexes)[i++]); \
if (field.IsEmpty()) { \
Local<TypeName> field; \
if (!maybe_field.ToLocal(&field)) { \
fprintf(stderr, "Failed to deserialize " #PropertyName "\n"); \
} \
PropertyName##_.Set(isolate_, field.ToLocalChecked()); \
PropertyName##_.Set(isolate_, field); \
} while (0);
PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES(VP)
PER_ISOLATE_SYMBOL_PROPERTIES(VY)
Expand All @@ -112,12 +113,13 @@ void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) {
#undef VP

for (size_t j = 0; j < AsyncWrap::PROVIDERS_LENGTH; j++) {
MaybeLocal<String> field =
MaybeLocal<String> maybe_field =
isolate_->GetDataFromSnapshotOnce<String>((*indexes)[i++]);
if (field.IsEmpty()) {
Local<String> field;
if (!maybe_field.ToLocal(&field)) {
fprintf(stderr, "Failed to deserialize AsyncWrap provider %zu\n", j);
}
async_wrap_providers_[j].Set(isolate_, field.ToLocalChecked());
async_wrap_providers_[j].Set(isolate_, field);
}
}

Expand Down