Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: src/snapshot/deserializer.cc

Issue 2736923002: SnapshotCreator: start from existing snapshot if we have one (Closed)
Patch Set: addressed comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot/deserializer.h ('k') | src/snapshot/serializer-common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/deserializer.cc
diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc
index 86d20e14c02525faa465004768a84415f1fa927a..a670bf796e3deeb08531a9a7d918b1d1642de18c 100644
--- a/src/snapshot/deserializer.cc
+++ b/src/snapshot/deserializer.cc
@@ -76,6 +76,10 @@ void Deserializer::Initialize(Isolate* isolate) {
external_reference_table_ = ExternalReferenceTable::instance(isolate);
CHECK_EQ(magic_number_,
SerializedData::ComputeMagicNumber(external_reference_table_));
+ // The current isolate must have at least as many API-provided external
+ // references as the to-be-deserialized snapshot expects and refers to.
+ CHECK_LE(num_extra_references_,
+ SerializedData::GetExtraReferences(external_reference_table_));
}
void Deserializer::Deserialize(Isolate* isolate) {
« no previous file with comments | « src/snapshot/deserializer.h ('k') | src/snapshot/serializer-common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698