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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 18862004: Call shutdown callback before the isolate is destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index c002066478bb47231c41c71f58a26106cb757d77..3cb5b75faf30eed5de5d3930c12fe9e8ce5c2e64 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -798,7 +798,13 @@ DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
DART_EXPORT void Dart_ShutdownIsolate() {
- CHECK_ISOLATE(Isolate::Current());
+ Isolate* isolate = Isolate::Current();
+ CHECK_ISOLATE(isolate);
+ {
+ StackZone zone(isolate);
+ HandleScope handle_scope(isolate);
+ Dart::RunShutdownCallback();
+ }
STOP_TIMER(time_total_runtime);
Dart::ShutdownIsolate();
}
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698