Index: runtime/vm/native_api_impl.cc |
=================================================================== |
--- runtime/vm/native_api_impl.cc (revision 44762) |
+++ runtime/vm/native_api_impl.cc (working copy) |
@@ -48,7 +48,7 @@ |
} |
// Start the native port without a current isolate. |
IsolateSaver saver(Isolate::Current()); |
- Isolate::SetCurrent(NULL); |
+ Thread::ExitIsolate(); |
NativeMessageHandler* nmh = new NativeMessageHandler(name, handler); |
Dart_Port port_id = PortMap::CreatePort(nmh); |
@@ -60,7 +60,7 @@ |
DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id) { |
// Close the native port without a current isolate. |
IsolateSaver saver(Isolate::Current()); |
- Isolate::SetCurrent(NULL); |
+ Thread::ExitIsolate(); |
// TODO(turnidge): Check that the port is native before trying to close. |
return PortMap::ClosePort(native_port_id); |