| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8cf1add commit 6ebb98a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,12 +96,13 @@ void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) { | |||
| 96 | 96 | #define VS(PropertyName, StringValue) V(String, PropertyName) | |
| 97 | 97 | #define V(TypeName, PropertyName) \ | |
| 98 | 98 | do { \ | |
| 99 | - MaybeLocal<TypeName> field = \ | ||
| 99 | + MaybeLocal<TypeName> maybe_field = \ | ||
| 100 | 100 | isolate_->GetDataFromSnapshotOnce<TypeName>((*indexes)[i++]); \ | |
| 101 | - if (field.IsEmpty()) { \ | ||
| 101 | + Local<TypeName> field; \ | ||
| 102 | + if (!maybe_field.ToLocal(&field)) { \ | ||
| 102 | 103 | fprintf(stderr, "Failed to deserialize " #PropertyName "\n"); \ | |
| 103 | 104 | } \ | |
| 104 | - PropertyName##_.Set(isolate_, field.ToLocalChecked()); \ | ||
| 105 | + PropertyName##_.Set(isolate_, field); \ | ||
| 105 | 106 | } while (0); | |
| 106 | 107 | PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES(VP) | |
| 107 | 108 | PER_ISOLATE_SYMBOL_PROPERTIES(VY) | |
@@ -112,12 +113,13 @@ void IsolateData::DeserializeProperties(const std::vector<size_t>* indexes) { | |||
| 112 | 113 | #undef VP | |
| 113 | 114 | ||
| 114 | 115 | for (size_t j = 0; j < AsyncWrap::PROVIDERS_LENGTH; j++) { | |
| 115 | - MaybeLocal<String> field = | ||
| 116 | + MaybeLocal<String> maybe_field = | ||
| 116 | 117 | isolate_->GetDataFromSnapshotOnce<String>((*indexes)[i++]); | |
| 117 | - if (field.IsEmpty()) { | ||
| 118 | + Local<String> field; | ||
| 119 | + if (!maybe_field.ToLocal(&field)) { | ||
| 118 | 120 | fprintf(stderr, "Failed to deserialize AsyncWrap provider %zu\n", j); | |
| 119 | 121 | } | |
| 120 | - async_wrap_providers_[j].Set(isolate_, field.ToLocalChecked()); | ||
| 122 | + async_wrap_providers_[j].Set(isolate_, field); | ||
| 121 | 123 | } | |
| 122 | 124 | } | |
| 123 | 125 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments