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

Unified Diff: runtime/vm/snapshot.cc

Issue 1686773002: Precompilation: drop unused types and type arguments and empty classes and libraries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 340351a2e58310a0b4e2b39a7326bfa8537fc004..bf02cbaa6c685e86c6c143ff59863aae6d436575 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -683,8 +683,10 @@ RawApiError* SnapshotReader::VerifyVersion() {
kMessageBufferSize,
"No full snapshot version found, expected '%s'",
Version::SnapshotString());
- const String& msg = String::Handle(String::New(message_buffer));
- return ApiError::New(msg);
+ // This can also fail while bringing up the VM isolate, so make sure to
+ // allocate the error message in old space.
+ const String& msg = String::Handle(String::New(message_buffer, Heap::kOld));
+ return ApiError::New(msg, Heap::kOld);
}
const char* version = reinterpret_cast<const char*>(CurrentBufferAddress());
@@ -2163,8 +2165,7 @@ bool SnapshotWriter::CheckAndWritePredefinedObject(RawObject* rawobj) {
return true;
}
- // Now check if it is an object from the VM isolate (NOTE: premarked objects
- // are considered to be objects in the VM isolate). These objects are shared
+ // Now check if it is an object from the VM isolate. These objects are shared
// by all isolates.
if (rawobj->IsVMHeapObject() && HandleVMIsolateObject(rawobj)) {
return true;
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698