Skip to content

Commit

Permalink
Move code that sends an isolate shutdown message to the service isola…
Browse files Browse the repository at this point in the history
…te to the block after we transition the thread state to ThreadInVM.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2047123002 .
  • Loading branch information
a-siva committed Jun 8, 2016
1 parent 055231c commit 6b9581e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion runtime/vm/dart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ void Dart::RunShutdownCallback() {
Isolate* isolate = Isolate::Current();
void* callback_data = isolate->init_callback_data();
Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
ServiceIsolate::SendIsolateShutdownMessage();
if (callback != NULL) {
(callback)(callback_data);
}
Expand Down
13 changes: 7 additions & 6 deletions runtime/vm/dart_api_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1297,13 +1297,14 @@ DART_EXPORT void Dart_ShutdownIsolate() {
StackZone zone(T);
HandleScope handle_scope(T);
Dart::RunShutdownCallback();
// The Thread structure is disassociated from the isolate, we do the
// safepoint transition explicity here instead of using the TransitionXXX
// scope objects as the original transition happened outside this scope in
// Dart_EnterIsolate/Dart_CreateIsolate.
T->ExitSafepoint();
T->set_execution_state(Thread::kThreadInVM);
ServiceIsolate::SendIsolateShutdownMessage();
}
// The Thread structure is disassociated from the isolate, we do the
// safepoint transition explicity here instead of using the TransitionXXX
// scope objects as the original transition happened outside this scope in
// Dart_EnterIsolate/Dart_CreateIsolate.
T->ExitSafepoint();
T->set_execution_state(Thread::kThreadInVM);
Dart::ShutdownIsolate();
}

Expand Down

0 comments on commit 6b9581e

Please sign in to comment.