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

Unified Diff: runtime/bin/isolate_data.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/gen_snapshot.cc ('k') | runtime/bin/isolate_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/isolate_data.h
diff --git a/runtime/bin/isolate_data.h b/runtime/bin/isolate_data.h
index 5ed1ed864f6398bfeb4ff04474587a72205e1841..505081e06304ceb79f9e10c02f52eaa7d262fcdb 100644
--- a/runtime/bin/isolate_data.h
+++ b/runtime/bin/isolate_data.h
@@ -13,6 +13,7 @@ namespace dart {
namespace bin {
// Forward declaration.
+class AppSnapshot;
class EventHandler;
class Loader;
@@ -23,34 +24,9 @@ class IsolateData {
public:
IsolateData(const char* url,
const char* package_root,
- const char* packages_file)
- : script_url((url != NULL) ? strdup(url) : NULL),
- package_root(NULL),
- packages_file(NULL),
- udp_receive_buffer(NULL),
- builtin_lib_(NULL),
- loader_(NULL) {
- if (package_root != NULL) {
- ASSERT(packages_file == NULL);
- this->package_root = strdup(package_root);
- } else if (packages_file != NULL) {
- this->packages_file = strdup(packages_file);
- }
- }
-
- ~IsolateData() {
- free(script_url);
- script_url = NULL;
- free(package_root);
- package_root = NULL;
- free(packages_file);
- packages_file = NULL;
- free(udp_receive_buffer);
- udp_receive_buffer = NULL;
- if (builtin_lib_ != NULL) {
- Dart_DeletePersistentHandle(builtin_lib_);
- }
- }
+ const char* packages_file,
+ AppSnapshot* app_snapshot);
+ ~IsolateData();
Dart_Handle builtin_lib() const {
ASSERT(builtin_lib_ != NULL);
@@ -83,6 +59,7 @@ class IsolateData {
private:
Dart_Handle builtin_lib_;
Loader* loader_;
+ AppSnapshot* app_snapshot_;
DISALLOW_COPY_AND_ASSIGN(IsolateData);
};
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/isolate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698