mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
Move code that sends an isolate shutdown message to the service isolate to the block after we transition the thread state to ThreadInVM.
R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/2047123002 .
This commit is contained in:
parent
055231cee0
commit
6b9581e228
2 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue