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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 11824053: Implement port equality on SendPortSync (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 80 char fix Created 7 years, 11 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/isolate/base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 4047ff8e486f2721ebf7e03c73633f155962b95d..c7a30c9556fe9453062add92f9fa7a06771ed215 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -30560,6 +30560,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.
@@ -30590,6 +30595,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.
@@ -30605,6 +30617,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
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/isolate/base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698