| Index: runtime/lib/isolate_patch.dart
|
| diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
|
| index d2938255f019cf30802d60799759ee0fd5d7613c..c359783109598bdd471999919f4a53d5929e01ab 100644
|
| --- a/runtime/lib/isolate_patch.dart
|
| +++ b/runtime/lib/isolate_patch.dart
|
| @@ -35,6 +35,7 @@ class _ReceivePortImpl implements ReceivePort {
|
| }
|
| return new _ReceivePortImpl._internal(id);
|
| }
|
| +
|
| _ReceivePortImpl._internal(int id) : _id = id {
|
| if (_portMap == null) {
|
| _portMap = new Map();
|
| @@ -42,10 +43,15 @@ class _ReceivePortImpl implements ReceivePort {
|
| _portMap[id] = this;
|
| }
|
|
|
| - // Called from the VM to dispatch to the handler.
|
| - static void _handleMessage(int id, int replyId, var message) {
|
| + // Called from the VM to retrieve the ReceivePort for a message.
|
| + static _ReceivePortImpl _lookupReceivePort(int id) {
|
| assert(_portMap != null);
|
| - ReceivePort port = _portMap[id];
|
| + return _portMap[id];
|
| + }
|
| +
|
| + // Called from the VM to dispatch to the handler.
|
| + static void _handleMessage(_ReceivePortImpl port, int replyId, var message) {
|
| + assert(port != null);
|
| SendPort replyTo = (replyId == 0) ? null : new _SendPortImpl(replyId);
|
| (port._onMessage)(message, replyTo);
|
| }
|
|
|