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

Unified Diff: runtime/bin/snapshot_utils.h

Issue 2694103004: Cleanup app snapshots on isolate/vm exit. (Closed)
Patch Set: merge Created 3 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/bin/main.cc ('k') | runtime/bin/snapshot_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/snapshot_utils.h
diff --git a/runtime/bin/snapshot_utils.h b/runtime/bin/snapshot_utils.h
index fa667776f00b33332488932c5c65bbea9db2c0d9..758b38634db95428d5c2914e2162d690b7135543 100644
--- a/runtime/bin/snapshot_utils.h
+++ b/runtime/bin/snapshot_utils.h
@@ -10,6 +10,22 @@
namespace dart {
namespace bin {
+class AppSnapshot {
+ public:
+ virtual ~AppSnapshot() {}
+
+ virtual void SetBuffers(const uint8_t** vm_data_buffer,
+ const uint8_t** vm_instructions_buffer,
+ const uint8_t** isolate_data_buffer,
+ const uint8_t** isolate_instructions_buffer) = 0;
+
+ protected:
+ AppSnapshot() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AppSnapshot);
+};
+
class Snapshot {
public:
static void GenerateScript(const char* snapshot_filename);
@@ -17,11 +33,7 @@ class Snapshot {
static void GenerateAppAOTAsBlobs(const char* snapshot_filename);
static void GenerateAppAOTAsAssembly(const char* snapshot_filename);
- static bool ReadAppSnapshot(const char* script_name,
- const uint8_t** vm_data_buffer,
- const uint8_t** vm_instructions_buffer,
- const uint8_t** isolate_data_buffer,
- const uint8_t** isolate_instructions_buffer);
+ static AppSnapshot* TryReadAppSnapshot(const char* script_name);
private:
DISALLOW_ALLOCATION();
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/snapshot_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698