Index: runtime/bin/process.cc |
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc |
index ff88201bc12d9cc7a6b67cf5e55b05f839461f2c..e22e07c4fabd223bbd9d659332eb44dd54b96d2b 100644 |
--- a/runtime/bin/process.cc |
+++ b/runtime/bin/process.cc |
@@ -246,11 +246,7 @@ void FUNCTION_NAME(Process_Exit)(Dart_NativeArguments args) { |
int64_t status = 0; |
// Ignore result if passing invalid argument and just exit 0. |
DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 0), &status); |
- IsolateData* isolate_data = |
- reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); |
- if (isolate_data->exit_hook() != NULL) { |
- isolate_data->exit_hook()(status); |
- } |
+ Process::RunExitHook(status); |
Dart_ExitIsolate(); |
Platform::Exit(static_cast<int>(status)); |
} |