Chromium Code Reviews| Index: sdk/lib/html/html_common/conversions.dart |
| =================================================================== |
| --- sdk/lib/html/html_common/conversions.dart (revision 24212) |
| +++ sdk/lib/html/html_common/conversions.dart (working copy) |
| @@ -34,7 +34,7 @@ |
| Map convertNativeToDart_Dictionary(object) { |
| if (object == null) return null; |
| var dict = {}; |
| - for (final key in JS('=List', 'Object.getOwnPropertyNames(#)', object)) { |
| + for (final key in JS('JSExtendableArray', 'Object.getOwnPropertyNames(#)', object)) { |
|
kasperl
2013/06/21 06:03:55
Long line.
ngeoffray
2013/06/24 09:47:23
Done.
|
| dict[key] = JS('var', '#[#]', object, key); |
| } |
| return dict; |
| @@ -165,7 +165,7 @@ |
| var copy = readSlot(slot); |
| if (copy != null) { |
| if (true == copy) { // Cycle, so commit to making a copy. |
| - copy = JS('=List', 'new Array(#)', length); |
| + copy = JS('JSExtendableArray', 'new Array(#)', length); |
| writeSlot(slot, copy); |
| } |
| return copy; |
| @@ -175,7 +175,7 @@ |
| // Always clone the list, as it may have non-native properties or methods |
| // from interceptors and such. |
| - copy = JS('=List', 'new Array(#)', length); |
| + copy = JS('JSExtendableArray', 'new Array(#)', length); |
| writeSlot(slot, copy); |
| for ( ; i < length; i++) { |
| @@ -254,7 +254,7 @@ |
| copy = {}; |
| writeSlot(slot, copy); |
| - for (final key in JS('=List', 'Object.keys(#)', e)) { |
| + for (final key in JS('JSExtendableArray', 'Object.keys(#)', e)) { |
| copy[key] = walk(JS('var', '#[#]', e, key)); |
| } |
| return copy; |
| @@ -268,7 +268,7 @@ |
| int length = e.length; |
| // Since a JavaScript Array is an instance of Dart List, we can modify it |
| // in-place unless we must copy. |
| - copy = mustCopy ? JS('=List', 'new Array(#)', length) : e; |
| + copy = mustCopy ? JS('JSExtendableArray', 'new Array(#)', length) : e; |
| writeSlot(slot, copy); |
| for (int i = 0; i < length; i++) { |
| @@ -342,7 +342,7 @@ |
| const String _serializedScriptValue = |
| 'num|String|bool|' |
| - '=List|=Object|' |
| + 'JSExtendableArray|=Object|' |
| 'Blob|File|ByteBuffer|TypedData' |
| // TODO(sra): Add Date, RegExp. |
| ; |