diff --git a/src/env.cc b/src/env.cc index ba9ac1e31ffe92..71ad278d6a3878 100644 --- a/src/env.cc +++ b/src/env.cc @@ -96,12 +96,13 @@ void IsolateData::DeserializeProperties(const std::vector* indexes) { #define VS(PropertyName, StringValue) V(String, PropertyName) #define V(TypeName, PropertyName) \ do { \ - MaybeLocal field = \ + MaybeLocal maybe_field = \ isolate_->GetDataFromSnapshotOnce((*indexes)[i++]); \ - if (field.IsEmpty()) { \ + Local 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) @@ -112,12 +113,13 @@ void IsolateData::DeserializeProperties(const std::vector* indexes) { #undef VP for (size_t j = 0; j < AsyncWrap::PROVIDERS_LENGTH; j++) { - MaybeLocal field = + MaybeLocal maybe_field = isolate_->GetDataFromSnapshotOnce((*indexes)[i++]); - if (field.IsEmpty()) { + Local 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); } }