| Index: runtime/vm/dart.cc
|
| diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
|
| index 75689247de36c62c526e186d9aea4ec9f742e5ce..7a17cc32a0199acc00ca2adadfdf387593d194bb 100644
|
| --- a/runtime/vm/dart.cc
|
| +++ b/runtime/vm/dart.cc
|
| @@ -228,7 +228,8 @@ const char* Dart::Cleanup() {
|
| {
|
| // Set the VM isolate as current isolate when shutting down
|
| // Metrics so that we can use a StackZone.
|
| - Thread::EnterIsolate(vm_isolate_);
|
| + bool result = Thread::EnterIsolate(vm_isolate_);
|
| + ASSERT(result);
|
| Metric::Cleanup();
|
| Thread::ExitIsolate();
|
| }
|
| @@ -252,7 +253,8 @@ const char* Dart::Cleanup() {
|
| thread_pool_ = NULL;
|
|
|
| // Set the VM isolate as current isolate.
|
| - Thread::EnterIsolate(vm_isolate_);
|
| + bool result = Thread::EnterIsolate(vm_isolate_);
|
| + ASSERT(result);
|
|
|
| ShutdownIsolate();
|
| vm_isolate_ = NULL;
|
| @@ -407,7 +409,8 @@ 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);
|
| + bool result = Thread::EnterIsolate(isolate);
|
| + ASSERT(result);
|
| ShutdownIsolate();
|
| // Since the isolate is shutdown and deleted, there is no need to
|
| // exit the isolate here.
|
|
|