Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Unified Diff: runtime/vm/native_api_impl.cc

Issue 2217693002: Delete NativeMessageHandler once a native port closes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: edits Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/message_handler.cc ('k') | runtime/vm/native_message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_api_impl.cc
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index 1bc5d4c2305f1d2287cd453a3914ea8fae786e74..7abd52e0ccc917aa39b30d2d4be9b59bbed2061e 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -90,6 +90,7 @@ DART_EXPORT Dart_Port Dart_NewNativePort(const char* name,
NativeMessageHandler* nmh = new NativeMessageHandler(name, handler);
Dart_Port port_id = PortMap::CreatePort(nmh);
+ PortMap::SetPortState(port_id, PortMap::kLivePort);
nmh->Run(Dart::thread_pool(), NULL, NULL, 0);
return port_id;
}
« no previous file with comments | « runtime/vm/message_handler.cc ('k') | runtime/vm/native_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698