Index: runtime/vm/dart_api_impl.cc |
=================================================================== |
--- runtime/vm/dart_api_impl.cc (revision 44762) |
+++ runtime/vm/dart_api_impl.cc (working copy) |
@@ -1356,7 +1356,10 @@ |
CHECK_NO_ISOLATE(Isolate::Current()); |
// TODO(16615): Validate isolate parameter. |
Isolate* iso = reinterpret_cast<Isolate*>(isolate); |
- Isolate::SetCurrent(iso); |
+ if (iso->mutator_thread() != NULL) { |
+ FATAL("Multiple mutators within one isolate is not supported."); |
+ } |
+ Thread::EnterIsolate(iso); |
} |
@@ -1384,7 +1387,7 @@ |
DART_EXPORT void Dart_ExitIsolate() { |
CHECK_ISOLATE(Isolate::Current()); |
- Isolate::SetCurrent(NULL); |
+ Thread::ExitIsolate(); |
} |