| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index 002d334e261df3cddaf1474342b105456085af1a..254d829e5bfcc3b60beeaed579d4231348b05583 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -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();
|
| }
|
|
|
|
|