Index: runtime/vm/native_message_handler.cc |
diff --git a/runtime/vm/native_message_handler.cc b/runtime/vm/native_message_handler.cc |
index 1763341fa067a9df4b2e0e3cb100665db3bca523..7779e95c5f369bfac872a4056d0cbb63a67ce29c 100644 |
--- a/runtime/vm/native_message_handler.cc |
+++ b/runtime/vm/native_message_handler.cc |
@@ -15,6 +15,8 @@ NativeMessageHandler::NativeMessageHandler(const char* name, |
Dart_NativeMessageHandler func) |
: name_(strdup(name)), |
func_(func) { |
+ // A NativeMessageHandler always has one live port. |
+ increment_live_ports(); |
} |