Index: runtime/vm/native_message_handler.cc |
diff --git a/runtime/vm/native_message_handler.cc b/runtime/vm/native_message_handler.cc |
index 41fbd2cabc0ecafbf6c75db597e20290b94c65d7..baa073d69a3cc0c56365b204f4de61a10411030d 100644 |
--- a/runtime/vm/native_message_handler.cc |
+++ b/runtime/vm/native_message_handler.cc |
@@ -12,8 +12,9 @@ |
namespace dart { |
NativeMessageHandler::NativeMessageHandler(const char* name, |
- Dart_NativeMessageHandler func) |
- : name_(strdup(name)), func_(func) {} |
+ Dart_NativeMessageHandler func, |
+ void* peer) |
+ : name_(strdup(name)), func_(func), peer_(peer) {} |
NativeMessageHandler::~NativeMessageHandler() { |
@@ -41,7 +42,7 @@ MessageHandler::MessageStatus NativeMessageHandler::HandleMessage( |
Dart_CObject* object; |
ApiMessageReader reader(message); |
object = reader.ReadMessage(); |
- (*func())(message->dest_port(), object); |
+ (*func())(message->dest_port(), object, peer()); |
delete message; |
return kOK; |
} |