| 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..3cb5b75faf30eed5de5d3930c12fe9e8ce5c2e64 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -798,7 +798,13 @@ DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
|
|
|
|
|
| DART_EXPORT void Dart_ShutdownIsolate() {
|
| - CHECK_ISOLATE(Isolate::Current());
|
| + Isolate* isolate = Isolate::Current();
|
| + CHECK_ISOLATE(isolate);
|
| + {
|
| + StackZone zone(isolate);
|
| + HandleScope handle_scope(isolate);
|
| + Dart::RunShutdownCallback();
|
| + }
|
| STOP_TIMER(time_total_runtime);
|
| Dart::ShutdownIsolate();
|
| }
|
|
|