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

Unified Diff: runtime/bin/isolate_data.cc

Issue 2720723005: VM: Fix an app-jit related shutdown race. (Closed)
Patch Set: 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/isolate_data.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/isolate_data.cc
diff --git a/runtime/bin/isolate_data.cc b/runtime/bin/isolate_data.cc
index c10180df6feae90b4c1563cec5cc9d814beb1a98..1cf3ebe3d848ddc6613a0f9c6efdf6cce14e5c4d 100644
--- a/runtime/bin/isolate_data.cc
+++ b/runtime/bin/isolate_data.cc
@@ -29,6 +29,14 @@ IsolateData::IsolateData(const char* url,
}
+void IsolateData::OnIsolateShutdown() {
+ if (builtin_lib_ != NULL) {
+ Dart_DeletePersistentHandle(builtin_lib_);
+ builtin_lib_ = NULL;
+ }
+}
+
+
IsolateData::~IsolateData() {
free(script_url);
script_url = NULL;
@@ -38,9 +46,6 @@ IsolateData::~IsolateData() {
packages_file = NULL;
free(udp_receive_buffer);
udp_receive_buffer = NULL;
- if (builtin_lib_ != NULL) {
- Dart_DeletePersistentHandle(builtin_lib_);
- }
delete app_snapshot_;
app_snapshot_ = NULL;
}
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698