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

Unified Diff: runtime/vm/snapshot.cc

Issue 1156053006: - Determine whether the simulator is being used in globals.h (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 7 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/simulator_mips.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 d9249db1d39e92b68cd45b38f272bac9b389c73b..6bce49759d8c85b5d296bb4135e99689163bdbab 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -596,8 +596,10 @@ RawApiError* SnapshotReader::VerifyVersion() {
Version::SnapshotString(),
actual_version);
free(actual_version);
- 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);
}
Advance(version_len);
return ApiError::null();
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698