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

Side by Side Diff: tool/input_sdk/lib/js/dart2js/js_dart2js.dart

Issue 1936693002: Revert "Workaround #537" (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 | « lib/runtime/dart_sdk.js ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 args == null ? null : new List.from(args.map(_convertToJS)))); 310 args == null ? null : new List.from(args.map(_convertToJS))));
311 } 311 }
312 312
313 // TODO(jmesserly): this is totally unnecessary in dev_compiler. 313 // TODO(jmesserly): this is totally unnecessary in dev_compiler.
314 /** A [List] that proxies a JavaScript array. */ 314 /** A [List] that proxies a JavaScript array. */
315 class JsArray<E> extends JsObject with ListMixin<E> { 315 class JsArray<E> extends JsObject with ListMixin<E> {
316 316
317 /** 317 /**
318 * Creates a new JavaScript array. 318 * Creates a new JavaScript array.
319 */ 319 */
320 // TODO(vsm): Making this a factory to workaround #537. 320 JsArray() : super._fromJs([]);
321 factory JsArray() { return new JsArray._fromJs([]); }
322 321
323 /** 322 /**
324 * Creates a new JavaScript array and initializes it to the contents of 323 * Creates a new JavaScript array and initializes it to the contents of
325 * [other]. 324 * [other].
326 */ 325 */
327 JsArray.from(Iterable<E> other) 326 JsArray.from(Iterable<E> other)
328 : super._fromJs([]..addAll(other.map(_convertToJS))); 327 : super._fromJs([]..addAll(other.map(_convertToJS)));
329 328
330 JsArray._fromJs(jsObject) : super._fromJs(jsObject); 329 JsArray._fromJs(jsObject) : super._fromJs(jsObject);
331 330
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 ' for (let arg of arguments) {' 550 ' for (let arg of arguments) {'
552 ' args.push(arg);' 551 ' args.push(arg);'
553 ' }' 552 ' }'
554 ' return #(...args);' 553 ' return #(...args);'
555 '}', 554 '}',
556 f); 555 f);
557 _interopCaptureThisExpando[f] = ret; 556 _interopCaptureThisExpando[f] = ret;
558 } 557 }
559 return ret; 558 return ret;
560 } 559 }
OLDNEW
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698