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

Side by Side Diff: lib/html/src/Serialization.dart

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 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
« no previous file with comments | « lib/html/scripts/idlrenderer.dart ('k') | lib/html/src/native_DOMImplementation.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 // Patch file for the dart:isolate library. 5 // Patch file for the dart:isolate library.
6 6
7 /******************************************************** 7 /********************************************************
8 Inserted from lib/isolate/serialization.dart 8 Inserted from lib/isolate/serialization.dart
9 ********************************************************/ 9 ********************************************************/
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // TODO(floitsch): we are losing the generic type. 116 // TODO(floitsch): we are losing the generic type.
117 return ['list', id, jsArray]; 117 return ['list', id, jsArray];
118 } 118 }
119 119
120 visitMap(Map map) { 120 visitMap(Map map) {
121 int copyId = _visited[map]; 121 int copyId = _visited[map];
122 if (copyId != null) return ['ref', copyId]; 122 if (copyId != null) return ['ref', copyId];
123 123
124 int id = _nextFreeRefId++; 124 int id = _nextFreeRefId++;
125 _visited[map] = id; 125 _visited[map] = id;
126 var keys = _serializeList(map.getKeys()); 126 var keys = _serializeList(map.keys);
127 var values = _serializeList(map.getValues()); 127 var values = _serializeList(map.values);
128 // TODO(floitsch): we are losing the generic type. 128 // TODO(floitsch): we are losing the generic type.
129 return ['map', id, keys, values]; 129 return ['map', id, keys, values];
130 } 130 }
131 131
132 _serializeList(List list) { 132 _serializeList(List list) {
133 int len = list.length; 133 int len = list.length;
134 var result = new List(len); 134 var result = new List(len);
135 for (int i = 0; i < len; i++) { 135 for (int i = 0; i < len; i++) {
136 result[i] = _dispatch(list[i]); 136 result[i] = _dispatch(list[i]);
137 } 137 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 abstract deserializeSendPort(List x); 206 abstract deserializeSendPort(List x);
207 207
208 deserializeObject(List x) { 208 deserializeObject(List x) {
209 // TODO(floitsch): Use real exception (which one?). 209 // TODO(floitsch): Use real exception (which one?).
210 throw "Unexpected serialized object"; 210 throw "Unexpected serialized object";
211 } 211 }
212 } 212 }
213 213
OLDNEW
« no previous file with comments | « lib/html/scripts/idlrenderer.dart ('k') | lib/html/src/native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698