Index: runtime/bin/main.cc |
=================================================================== |
--- runtime/bin/main.cc (revision 28185) |
+++ runtime/bin/main.cc (working copy) |
@@ -630,6 +630,8 @@ |
Dart_ExitScope(); |
Dart_ShutdownIsolate(); |
+ Dart_Cleanup(); |
+ |
return exit_code; |
} |
@@ -799,8 +801,6 @@ |
result = Dart_CreateScriptSnapshot(&buffer, &size); |
if (Dart_IsError(result)) { |
Log::PrintErr("%s\n", Dart_GetError(result)); |
- Dart_ExitScope(); |
- Dart_ShutdownIsolate(); |
return DartErrorExit(result); |
} |
@@ -875,6 +875,8 @@ |
// Terminate process exit-code handler. |
Process::TerminateExitCodeHandler(); |
+ Dart_Cleanup(); |
+ |
// Free copied argument strings if converted. |
if (argv_converted) { |
for (int i = 0; i < argc; i++) free(argv[i]); |