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

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

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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
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 class _CloseToken { 5 class _CloseToken {
6 /// This token is sent from [IsolateSink]s to [IsolateStream]s to ask them to 6 /// This token is sent from [IsolateSink]s to [IsolateStream]s to ask them to
7 /// close themselves. 7 /// close themselves.
8 const _CloseToken(); 8 const _CloseToken();
9 } 9 }
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 class _IsolateSink implements IsolateSink { 28 class _IsolateSink implements IsolateSink {
29 bool _isClosed = false; 29 bool _isClosed = false;
30 final SendPort _port; 30 final SendPort _port;
31 _IsolateSink._fromPort(this._port); 31 _IsolateSink._fromPort(this._port);
32 32
33 void add(dynamic message) { 33 void add(dynamic message) {
34 _port.send(message); 34 _port.send(message);
35 } 35 }
36 36
37 void addError(AsyncError errorEvent) { 37 void addError(Object errorEvent) {
38 throw new UnimplementedError("signalError on isolate streams"); 38 throw new UnimplementedError("addError on isolate streams");
39 } 39 }
40 40
41 void close() { 41 void close() {
42 if (_isClosed) return; 42 if (_isClosed) return;
43 add(const _CloseToken()); 43 add(const _CloseToken());
44 _isClosed = true; 44 _isClosed = true;
45 } 45 }
46 46
47 bool operator==(var other) { 47 bool operator==(var other) {
48 return other is IsolateSink && _port == other._port; 48 return other is IsolateSink && _port == other._port;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 return _portInternal; 187 return _portInternal;
188 } 188 }
189 189
190 /* patch */ static spawnFunction(void topLevelFunction(), 190 /* patch */ static spawnFunction(void topLevelFunction(),
191 [bool unhandledExceptionCallback(IsolateUnhandledException e)]) 191 [bool unhandledExceptionCallback(IsolateUnhandledException e)])
192 native "isolate_spawnFunction"; 192 native "isolate_spawnFunction";
193 193
194 /* patch */ static spawnUri(String uri) native "isolate_spawnUri"; 194 /* patch */ static spawnUri(String uri) native "isolate_spawnUri";
195 } 195 }
OLDNEW
« no previous file with comments | « runtime/embedders/openglui/common/gl.dart ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698