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

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
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..930ef0c1ea9ecd2fddec19c254cf214f1e003970 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -799,6 +799,13 @@ DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
DART_EXPORT void Dart_ShutdownIsolate() {
CHECK_ISOLATE(Isolate::Current());
+ Isolate* isolate = Isolate::Current();
siva 2013/07/08 22:39:27 Move this line up and change: CHECK_ISOLATE(isolat
Cutch 2013/07/08 22:43:24 Done.
+ {
+ StartIsolateScope start_scope(isolate);
siva 2013/07/08 22:39:27 StartIsolateScope is pretty much a NOP here as sav
Cutch 2013/07/08 22:43:24 Done.
+ StackZone zone(isolate);
+ HandleScope handle_scope(isolate);
+ Dart::RunShutdownCallback();
+ }
STOP_TIMER(time_total_runtime);
Dart::ShutdownIsolate();
}

Powered by Google App Engine
This is Rietveld 408576698