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

Unified Diff: runtime/bin/main.cc

Issue 25674009: Add framework for Dart_Terminate which will cleanup stuff on exit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « no previous file | runtime/include/dart_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698