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

Unified Diff: runtime/vm/dart.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.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 300e5b31e75817fd6e61f19895f7121252861033..5cb465a7642e0d7e8793a6598d8204fa868a15b7 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -213,13 +213,12 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
void Dart::ShutdownIsolate() {
Isolate* isolate = Isolate::Current();
void* callback_data = isolate->init_callback_data();
- isolate->Shutdown();
- delete isolate;
-
Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
if (callback != NULL) {
(callback)(callback_data);
}
+ isolate->Shutdown();
+ delete isolate;
}

Powered by Google App Engine
This is Rietveld 408576698