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

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

Issue 10941047: Don't generate FooList if it behaves like List<Foo> exactly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 5
6 // Conversions for IDBKey. 6 // Conversions for IDBKey.
7 // 7 //
8 // Per http://www.w3.org/TR/IndexedDB/#key-construct 8 // Per http://www.w3.org/TR/IndexedDB/#key-construct
9 // 9 //
10 // "A value is said to be a valid key if it is one of the following types: Array 10 // "A value is said to be a valid key if it is one of the following types: Array
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 if (e is File) { 198 if (e is File) {
199 throw const NotImplementedException('structured clone of File'); 199 throw const NotImplementedException('structured clone of File');
200 } 200 }
201 201
202 if (e is _BlobImpl) return e; 202 if (e is _BlobImpl) return e;
203 if (e is Blob) { 203 if (e is Blob) {
204 throw const NotImplementedException('structured clone of Blob'); 204 throw const NotImplementedException('structured clone of Blob');
205 } 205 }
206 206
207 if (e is _FileListImpl) return e; 207 if (e is _FileListImpl) return e;
208 if (e is FileList) {
209 throw const NotImplementedException('structured clone of FileList');
210 }
211 208
212 // TODO(sra): Firefox: How to convert _TypedImageData on the other end? 209 // TODO(sra): Firefox: How to convert _TypedImageData on the other end?
213 if (e is _ImageDataImpl) return e; 210 if (e is _ImageDataImpl) return e;
214 if (e is ImageData) { 211 if (e is ImageData) {
215 throw const NotImplementedException('structured clone of FileList'); 212 throw const NotImplementedException('structured clone of ImageData');
216 } 213 }
217 214
218 if (e is _ArrayBufferImpl) return e; 215 if (e is _ArrayBufferImpl) return e;
219 if (e is ArrayBuffer) { 216 if (e is ArrayBuffer) {
220 throw const NotImplementedException('structured clone of ArrayBuffer'); 217 throw const NotImplementedException('structured clone of ArrayBuffer');
221 } 218 }
222 219
223 if (e is _ArrayBufferViewImpl) return e; 220 if (e is _ArrayBufferViewImpl) return e;
224 if (e is ArrayBufferView) { 221 if (e is ArrayBufferView) {
225 throw const NotImplementedException('structured clone of ArrayBufferView') ; 222 throw const NotImplementedException('structured clone of ArrayBufferView') ;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 385 }
389 386
390 387
391 bool _isJavaScriptDate(value) => JS('bool', '# instanceof Date', value); 388 bool _isJavaScriptDate(value) => JS('bool', '# instanceof Date', value);
392 bool _isJavaScriptRegExp(value) => JS('bool', '# instanceof RegExp', value); 389 bool _isJavaScriptRegExp(value) => JS('bool', '# instanceof RegExp', value);
393 bool _isJavaScriptArray(value) => JS('bool', '# instanceof Array', value); 390 bool _isJavaScriptArray(value) => JS('bool', '# instanceof Array', value);
394 bool _isJavaScriptSimpleObject(value) => 391 bool _isJavaScriptSimpleObject(value) =>
395 JS('bool', 'Object.getPrototypeOf(#) === Object.prototype', value); 392 JS('bool', 'Object.getPrototypeOf(#) === Object.prototype', value);
396 bool _isImmutableJavaScriptArray(value) => 393 bool _isImmutableJavaScriptArray(value) =>
397 JS('bool', @'!!(#.immutable$list)', value); 394 JS('bool', @'!!(#.immutable$list)', value);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698