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

Unified Diff: sdk/lib/html/html_common/conversions_dartium.dart

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
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698