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

Side by Side Diff: runtime/lib/isolate_patch.dart

Issue 1386253003: Fixes RawReceivePort.hashCode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/isolate/raw_port_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:collection" show HashMap; 5 import "dart:collection" show HashMap;
6 import "dart:_internal"; 6 import "dart:_internal";
7 7
8 patch class ReceivePort { 8 patch class ReceivePort {
9 /* patch */ factory ReceivePort() = _ReceivePortImpl; 9 /* patch */ factory ReceivePort() = _ReceivePortImpl;
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 SendPort get sendPort { 120 SendPort get sendPort {
121 return _get_sendport(); 121 return _get_sendport();
122 } 122 }
123 123
124 bool operator==(var other) { 124 bool operator==(var other) {
125 return (other is _RawReceivePortImpl) && 125 return (other is _RawReceivePortImpl) &&
126 (this._get_id() == other._get_id()); 126 (this._get_id() == other._get_id());
127 } 127 }
128 128
129 int get hashCode { 129 int get hashCode {
130 return sendPort.hashCode(); 130 return sendPort.hashCode;
131 } 131 }
132 132
133 Uri get remotePortUri => new Uri.https('localhost', '55'); 133 Uri get remotePortUri => new Uri.https('localhost', '55');
134 134
135 /**** Internal implementation details ****/ 135 /**** Internal implementation details ****/
136 _get_id() native "RawReceivePortImpl_get_id"; 136 _get_id() native "RawReceivePortImpl_get_id";
137 _get_sendport() native "RawReceivePortImpl_get_sendport"; 137 _get_sendport() native "RawReceivePortImpl_get_sendport";
138 138
139 // Called from the VM to retrieve the handler for a message. 139 // Called from the VM to retrieve the handler for a message.
140 static _lookupHandler(int id) { 140 static _lookupHandler(int id) {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 static Isolate _getCurrentIsolate() { 483 static Isolate _getCurrentIsolate() {
484 List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate(); 484 List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate();
485 return new Isolate(portAndCapabilities[0], 485 return new Isolate(portAndCapabilities[0],
486 pauseCapability: portAndCapabilities[1], 486 pauseCapability: portAndCapabilities[1],
487 terminateCapability: portAndCapabilities[2]); 487 terminateCapability: portAndCapabilities[2]);
488 } 488 }
489 489
490 static List _getPortAndCapabilitiesOfCurrentIsolate() 490 static List _getPortAndCapabilitiesOfCurrentIsolate()
491 native "Isolate_getPortAndCapabilitiesOfCurrentIsolate"; 491 native "Isolate_getPortAndCapabilitiesOfCurrentIsolate";
492 } 492 }
OLDNEW
« no previous file with comments | « no previous file | tests/isolate/raw_port_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698