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()); |