 Chromium Code Reviews
 Chromium Code Reviews Issue 1421023005:
  Should we really be calling the serialized script value logic when getting elements out of Lists re…  (Closed) 
  Base URL: git@github.com:dart-lang/sdk.git@master
    
  
    Issue 1421023005:
  Should we really be calling the serialized script value logic when getting elements out of Lists re…  (Closed) 
  Base URL: git@github.com:dart-lang/sdk.git@master| Index: sdk/lib/html/html_common/conversions_dartium.dart | 
| diff --git a/sdk/lib/html/html_common/conversions_dartium.dart b/sdk/lib/html/html_common/conversions_dartium.dart | 
| index 22738eae6fa2a001fc93c350f58c0890ffb0fd5b..2403387b4e608e457e43e88cf080c08d76d2b535 100644 | 
| --- a/sdk/lib/html/html_common/conversions_dartium.dart | 
| +++ b/sdk/lib/html/html_common/conversions_dartium.dart | 
| @@ -236,6 +236,13 @@ wrap_jso_no_SerializedScriptvalue(jsObject) { | 
| return wrapper; | 
| } | 
| + // TODO(jacobr): auomatically wrapping JsArray here is fundamentally broken | 
| + // as it hijacks adding custom methods on JS Array classes as part of the | 
| + // new typed DartJsInterop. | 
| + // To make this work we really need to make DartHtmlWrappingList extend | 
| + // JsArrayImpl. Fixing this issue needs to be part of a broader refactor | 
| + // that allows calling custom typed JS interop methods on all dart:html | 
| + // classes. | 
| 
Alan Knight
2015/11/09 20:46:07
I think the largest issue here is that we call wra
 | 
| if (jsObject is js.JsArray) { | 
| var wrappingList = new DartHtmlWrappingList(jsObject); | 
| js.setDartHtmlWrapperFor(jsObject, wrappingList); | 
| @@ -380,7 +387,7 @@ class DartHtmlWrappingList extends ListBase implements NativeFieldWrapperClass2 | 
| final js.JsArray blink_jsObject; | 
| - operator [](int index) => wrap_jso(js.JsNative.getArrayIndex(blink_jsObject, index)); | 
| + operator [](int index) => wrap_jso_no_SerializedScriptvalue(js.JsNative.getArrayIndex(blink_jsObject, index)); | 
| 
Alan Knight
2015/11/09 20:46:07
I *think* this might be ok, but should look at the
 | 
| operator []=(int index, value) => blink_jsObject[index] = value; |