| Index: sdk/lib/html/html_common/conversions.dart
|
| diff --git a/sdk/lib/html/html_common/conversions.dart b/sdk/lib/html/html_common/conversions.dart
|
| index 063c7e9389c0a86210320899b8f1ead858c71861..12591d575ccf8263c861af45a3a8c9cb8f72cd3b 100644
|
| --- a/sdk/lib/html/html_common/conversions.dart
|
| +++ b/sdk/lib/html/html_common/conversions.dart
|
| @@ -173,38 +173,10 @@ _convertDartToNative_PrepareForStructuredClone(value) {
|
|
|
| int i = 0;
|
|
|
| - if (isJavaScriptArray(e) &&
|
| - // We have to copy immutable lists, otherwise the structured clone
|
| - // algorithm will copy the .immutable$list marker property, making the
|
| - // list immutable when received!
|
| - !isImmutableJavaScriptArray(e)) {
|
| - writeSlot(slot, true); // Deferred copy.
|
| - for ( ; i < length; i++) {
|
| - var element = e[i];
|
| - var elementCopy = walk(element);
|
| - if (!identical(elementCopy, element)) {
|
| - copy = readSlot(slot); // Cyclic reference may have created it.
|
| - if (true == copy) {
|
| - copy = JS('=List', 'new Array(#)', length);
|
| - writeSlot(slot, copy);
|
| - }
|
| - for (int j = 0; j < i; j++) {
|
| - copy[j] = e[j];
|
| - }
|
| - copy[i] = elementCopy;
|
| - i++;
|
| - break;
|
| - }
|
| - }
|
| - if (copy == null) {
|
| - copy = e;
|
| - writeSlot(slot, copy);
|
| - }
|
| - } else {
|
| - // Not a JavaScript Array. We are forced to make a copy.
|
| - copy = JS('=List', 'new Array(#)', length);
|
| - writeSlot(slot, copy);
|
| - }
|
| + // Always clone the list, as it may have non-native properties or methods
|
| + // from interceptors and such.
|
| + copy = JS('=List', 'new Array(#)', length);
|
| + writeSlot(slot, copy);
|
|
|
| for ( ; i < length; i++) {
|
| copy[i] = walk(e[i]);
|
|
|