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

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

Issue 1383903002: 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') | sdk/lib/web_sql/dartium/web_sql_dartium.dart » ('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 // Lazily create the Dart class that wraps the JS object when the object in 810 return super[index];
811 // a list if fetched.
812 var wrap_entry = html.wrap_jso(super[index]);
813 super[index] = wrap_entry;
814 return wrap_entry;
815 } 811 }
816 812
817 void operator []=(index, E value) { 813 void operator []=(index, E value) {
818 if (index is int) { 814 if (index is int) {
819 _checkIndex(index); 815 _checkIndex(index);
820 } 816 }
821 super[index] = value; 817 super[index] = value;
822 } 818 }
823 819
824 int get length native "JsArray_length"; 820 int get length native "JsArray_length";
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 881
886 /** 882 /**
887 * Returns a method that can be called with an arbitrary number (for n less 883 * Returns a method that can be called with an arbitrary number (for n less
888 * than 11) of arguments without violating Dart type checks. 884 * than 11) of arguments without violating Dart type checks.
889 */ 885 */
890 Function _wrapAsDebuggerVarArgsFunction(JsFunction jsFunction) => 886 Function _wrapAsDebuggerVarArgsFunction(JsFunction jsFunction) =>
891 ([a1 = _UNDEFINED, a2 = _UNDEFINED, a3 = _UNDEFINED, a4 = _UNDEFINED, 887 ([a1 = _UNDEFINED, a2 = _UNDEFINED, a3 = _UNDEFINED, a4 = _UNDEFINED,
892 a5 = _UNDEFINED, a6 = _UNDEFINED, a7 = _UNDEFINED, a8 = _UNDEFINED, 888 a5 = _UNDEFINED, a6 = _UNDEFINED, a7 = _UNDEFINED, a8 = _UNDEFINED,
893 a9 = _UNDEFINED, a10 = _UNDEFINED]) => jsFunction._applyDebuggerOnly( 889 a9 = _UNDEFINED, a10 = _UNDEFINED]) => jsFunction._applyDebuggerOnly(
894 _stripUndefinedArgs([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10])); 890 _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') | sdk/lib/web_sql/dartium/web_sql_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698