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

Unified Diff: runtime/vm/snapshot.cc

Issue 2481013006: Check that Dart_CreateIsolate is given a correct kind of snapshot. (Closed)
Patch Set: . Created 4 years, 1 month 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/snapshot.h ('k') | runtime/vm/snapshot_test.cc » ('j') | 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 08cf77ce3a9a7299cf79ad77175343a800e8f584..61506387d2ffa8a22982c4d24f18721cb91ccc57 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -132,6 +132,21 @@ static intptr_t GetTypeIndex(
}
+const char* Snapshot::KindToCString(Kind kind) {
+ switch (kind) {
+ case kCore: return "core";
+ case kScript: return "script";
+ case kMessage: return "message";
+ case kAppWithJIT: return "app-jit";
+ case kAppNoJIT: return "app-aot";
+ case kNone: return "none";
+ case kInvalid:
+ default:
+ return "invalid";
+ }
+}
+
+
// TODO(5411462): Temporary setup of snapshot for testing purposes,
// the actual creation of a snapshot maybe done differently.
const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) {
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698