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

Side by Side Diff: sdk/lib/js/dartium/js_dartium.dart

Issue 1378183003: Revert "wrap_jso should wrap JsArray as well, not always call wrap on its contents" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/html.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 * Support for interoperating with JavaScript. 6 * Support for interoperating with JavaScript.
7 * 7 *
8 * This library provides access to JavaScript objects from Dart, allowing 8 * This library provides access to JavaScript objects from Dart, allowing
9 * Dart code to get and set properties, and call methods of JavaScript objects 9 * Dart code to get and set properties, and call methods of JavaScript objects
10 * and invoke JavaScript functions. The library takes care of converting 10 * and invoke JavaScript functions. The library takes care of converting
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 800 }
801 } 801 }
802 802
803 // Methods required by ListMixin 803 // Methods required by ListMixin
804 804
805 E operator [](index) { 805 E operator [](index) {
806 if (index is int) { 806 if (index is int) {
807 _checkIndex(index); 807 _checkIndex(index);
808 } 808 }
809 809
810 return super[index]; 810 // Lazily create the Dart class that wraps the JS object when the object in
811 // a list if fetched.
812 var wrap_entry = html.wrap_jso(super[index]);
813 super[index] = wrap_entry;
814 return wrap_entry;
811 } 815 }
812 816
813 void operator []=(index, E value) { 817 void operator []=(index, E value) {
814 if (index is int) { 818 if (index is int) {
815 _checkIndex(index); 819 _checkIndex(index);
816 } 820 }
817 super[index] = value; 821 super[index] = value;
818 } 822 }
819 823
820 int get length native "JsArray_length"; 824 int get length native "JsArray_length";
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 885
882 /** 886 /**
883 * Returns a method that can be called with an arbitrary number (for n less 887 * Returns a method that can be called with an arbitrary number (for n less
884 * than 11) of arguments without violating Dart type checks. 888 * than 11) of arguments without violating Dart type checks.
885 */ 889 */
886 Function _wrapAsDebuggerVarArgsFunction(JsFunction jsFunction) => 890 Function _wrapAsDebuggerVarArgsFunction(JsFunction jsFunction) =>
887 ([a1 = _UNDEFINED, a2 = _UNDEFINED, a3 = _UNDEFINED, a4 = _UNDEFINED, 891 ([a1 = _UNDEFINED, a2 = _UNDEFINED, a3 = _UNDEFINED, a4 = _UNDEFINED,
888 a5 = _UNDEFINED, a6 = _UNDEFINED, a7 = _UNDEFINED, a8 = _UNDEFINED, 892 a5 = _UNDEFINED, a6 = _UNDEFINED, a7 = _UNDEFINED, a8 = _UNDEFINED,
889 a9 = _UNDEFINED, a10 = _UNDEFINED]) => jsFunction._applyDebuggerOnly( 893 a9 = _UNDEFINED, a10 = _UNDEFINED]) => jsFunction._applyDebuggerOnly(
890 _stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10])); 894 _stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]));
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698