Index: tools/dom/src/Isolates.dart |
diff --git a/tools/dom/src/Isolates.dart b/tools/dom/src/Isolates.dart |
index 5bdf35bb22d4ff44bc36b76163053cc6f567349c..116ca4f8be821f98992a15c0894c5aa2ff7bf7e6 100644 |
--- a/tools/dom/src/Isolates.dart |
+++ b/tools/dom/src/Isolates.dart |
@@ -72,6 +72,11 @@ class _JsSendPortSync implements SendPortSync { |
return _deserialize(result); |
} |
+ bool operator==(var other) { |
+ return (other is _JsSendPortSync) && (_id == other._id); |
+ } |
+ |
+ int get hashCode => _id; |
} |
// TODO(vsm): Differentiate between Dart2Js and Dartium isolates. |
@@ -102,6 +107,13 @@ class _RemoteSendPortSync implements SendPortSync { |
window.on[source].remove(listener); |
return result; |
} |
+ |
+ bool operator==(var other) { |
+ return (other is _RemoteSendPortSync) && (_isolateId == other._isolateId) |
+ && (_portId == other._portId); |
+ } |
+ |
+ int get hashCode => _isolateId >> 16 + _portId; |
} |
// The receiver is in the same Dart isolate, compiled to JS. |
@@ -117,6 +129,13 @@ class _LocalSendPortSync implements SendPortSync { |
var result = _receivePort._callback(copy); |
return _deserialize(_serialize(result)); |
} |
+ |
+ bool operator==(var other) { |
+ return (other is _LocalSendPortSync) |
+ && (_receivePort == other._receivePort); |
+ } |
+ |
+ int get hashCode => _receivePort.hashCode; |
} |
// TODO(vsm): Move this to dart:isolate. This will take some |