Index: runtime/vm/dart.cc |
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc |
index e9c578a9d99d97301250818aa13e5dc7301c7e16..0fd5fa7107ab09f8c749cd5202023ed1042bcf4e 100644 |
--- a/runtime/vm/dart.cc |
+++ b/runtime/vm/dart.cc |
@@ -398,6 +398,17 @@ void Dart::RunShutdownCallback() { |
} |
+void Dart::ShutdownIsolate(Isolate* isolate) { |
+ ASSERT(Isolate::Current() == NULL); |
+ // We need to enter the isolate in order to shut it down. |
+ Thread::EnterIsolate(isolate); |
+ ShutdownIsolate(); |
+ // Since the isolate is shutdown and deleted, there is no need to |
+ // exit the isolate here. |
+ ASSERT(Isolate::Current() == NULL); |
+} |
+ |
+ |
void Dart::ShutdownIsolate() { |
Isolate* isolate = Isolate::Current(); |
isolate->Shutdown(); |