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

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

Issue 56153005: Remove SendPortSync and ReceivePortSync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 // Patch file for the dart:isolate library. 5 // Patch file for the dart:isolate library.
6 6
7 part of html; 7 part of html;
8 8
9 /******************************************************** 9 /********************************************************
10 Inserted from lib/isolate/serialization.dart 10 Inserted from lib/isolate/serialization.dart
(...skipping 26 matching lines...) Expand all
37 _visited.cleanup(); 37 _visited.cleanup();
38 } 38 }
39 return result; 39 return result;
40 } 40 }
41 41
42 _dispatch(var x) { 42 _dispatch(var x) {
43 if (isPrimitive(x)) return visitPrimitive(x); 43 if (isPrimitive(x)) return visitPrimitive(x);
44 if (x is List) return visitList(x); 44 if (x is List) return visitList(x);
45 if (x is Map) return visitMap(x); 45 if (x is Map) return visitMap(x);
46 if (x is SendPort) return visitSendPort(x); 46 if (x is SendPort) return visitSendPort(x);
47 if (x is SendPortSync) return visitSendPortSync(x);
48 47
49 // Overridable fallback. 48 // Overridable fallback.
50 return visitObject(x); 49 return visitObject(x);
51 } 50 }
52 51
53 visitPrimitive(x); 52 visitPrimitive(x);
54 visitList(List x); 53 visitList(List x);
55 visitMap(Map x); 54 visitMap(Map x);
56 visitSendPort(SendPort x); 55 visitSendPort(SendPort x);
57 visitSendPortSync(SendPortSync x);
58 56
59 visitObject(Object x) { 57 visitObject(Object x) {
60 // TODO(floitsch): make this a real exception. (which one)? 58 // TODO(floitsch): make this a real exception. (which one)?
61 throw "Message serialization: Illegal value $x passed"; 59 throw "Message serialization: Illegal value $x passed";
62 } 60 }
63 61
64 static bool isPrimitive(x) { 62 static bool isPrimitive(x) {
65 return (x == null) || (x is String) || (x is num) || (x is bool); 63 return (x == null) || (x is String) || (x is num) || (x is bool);
66 } 64 }
67 } 65 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 169 }
172 170
173 deserializeSendPort(List x); 171 deserializeSendPort(List x);
174 172
175 deserializeObject(List x) { 173 deserializeObject(List x) {
176 // TODO(floitsch): Use real exception (which one?). 174 // TODO(floitsch): Use real exception (which one?).
177 throw "Unexpected serialized object"; 175 throw "Unexpected serialized object";
178 } 176 }
179 } 177 }
180 178
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698