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

Unified Diff: runtime/bin/main.cc

Issue 2463923002: Don't use IsolateData for the exit hook as multiple embedders share the dart/bin while using differ… (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/bin/isolate_data.h ('k') | runtime/bin/process.h » ('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 c953b625dfeba5180a32e44ff605cab9a6622cc0..0f9f4f43f101dc0491f51ef02e6e109a4ed862d7 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -798,9 +798,6 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
IsolateData* isolate_data = new IsolateData(script_uri,
package_root,
packages_config);
- if (gen_snapshot_kind == kAppJIT) {
- isolate_data->set_exit_hook(SnapshotOnExitHook);
- }
Dart_Isolate isolate = Dart_CreateIsolate(script_uri,
main,
isolate_snapshot_buffer,
@@ -1891,6 +1888,9 @@ void main(int argc, char** argv) {
#if defined(DART_PRECOMPILED_RUNTIME)
vm_options.AddArgument("--precompilation");
#endif
+ if (gen_snapshot_kind == kAppJIT) {
+ Process::SetExitHook(SnapshotOnExitHook);
+ }
Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698