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

Unified Diff: runtime/bin/main.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.cc ('k') | runtime/bin/run_vm_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 6d7bc5e3a5a0779c7b78c2c02f253b7257ce60fc..5290205b34be09c56a2ab760f25ed0882e9316d0 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -1150,7 +1150,14 @@ char* BuildIsolateName(const char* script_name, const char* func_name) {
return buffer;
}
-static void ShutdownIsolate(void* callback_data) {
+
+static void OnIsolateShutdown(void* callback_data) {
+ IsolateData* isolate_data = reinterpret_cast<IsolateData*>(callback_data);
+ isolate_data->OnIsolateShutdown();
+}
+
+
+static void DeleteIsolateData(void* callback_data) {
IsolateData* isolate_data = reinterpret_cast<IsolateData*>(callback_data);
delete isolate_data;
}
@@ -1613,7 +1620,8 @@ void main(int argc, char** argv) {
init_params.vm_snapshot_data = vm_snapshot_data;
init_params.vm_snapshot_instructions = vm_snapshot_instructions;
init_params.create = CreateIsolateAndSetup;
- init_params.shutdown = ShutdownIsolate;
+ init_params.shutdown = OnIsolateShutdown;
+ init_params.cleanup = DeleteIsolateData;
init_params.file_open = DartUtils::OpenFile;
init_params.file_read = DartUtils::ReadFile;
init_params.file_write = DartUtils::WriteFile;
« no previous file with comments | « runtime/bin/isolate_data.cc ('k') | runtime/bin/run_vm_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698