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

Side by Side Diff: tools/dom/src/Isolates.dart

Issue 13044010: dom: more final more of the time (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nit Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/src/Microtask.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 part of html; 5 part of html;
6 6
7 _serialize(var message) { 7 _serialize(var message) {
8 return new _JsSerializer().traverse(message); 8 return new _JsSerializer().traverse(message);
9 } 9 }
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return ReceivePortSync._lookup(isolateId, portId); 56 return ReceivePortSync._lookup(isolateId, portId);
57 default: 57 default:
58 throw 'Illegal SendPortSync type: $tag'; 58 throw 'Illegal SendPortSync type: $tag';
59 } 59 }
60 } 60 }
61 } 61 }
62 62
63 // The receiver is JS. 63 // The receiver is JS.
64 class _JsSendPortSync implements SendPortSync { 64 class _JsSendPortSync implements SendPortSync {
65 65
66 num _id; 66 final num _id;
67 _JsSendPortSync(this._id); 67 _JsSendPortSync(this._id);
68 68
69 callSync(var message) { 69 callSync(var message) {
70 var serialized = _serialize(message); 70 var serialized = _serialize(message);
71 var result = _callPortSync(_id, serialized); 71 var result = _callPortSync(_id, serialized);
72 return _deserialize(result); 72 return _deserialize(result);
73 } 73 }
74 74
75 bool operator==(var other) { 75 bool operator==(var other) {
76 return (other is _JsSendPortSync) && (_id == other._id); 76 return (other is _JsSendPortSync) && (_id == other._id);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 get _isolateId => ReceivePortSync._isolateId; 214 get _isolateId => ReceivePortSync._isolateId;
215 215
216 void _dispatchEvent(String receiver, var message) { 216 void _dispatchEvent(String receiver, var message) {
217 var event = new CustomEvent(receiver, canBubble: false, cancelable:false, 217 var event = new CustomEvent(receiver, canBubble: false, cancelable:false,
218 detail: json.stringify(message)); 218 detail: json.stringify(message));
219 window.dispatchEvent(event); 219 window.dispatchEvent(event);
220 } 220 }
221 221
222 String _getPortSyncEventData(CustomEvent event) => event.detail; 222 String _getPortSyncEventData(CustomEvent event) => event.detail;
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/src/Microtask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698