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

Unified Diff: lib/runtime/dart/js.js

Issue 1484263002: Use destructuring assignments for named parameters (#180) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Destructure function params directly (no more opts in most cases) 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
Index: lib/runtime/dart/js.js
diff --git a/lib/runtime/dart/js.js b/lib/runtime/dart/js.js
index 51bbe0a40a90879b0f24ab2e090fdeb3f16b5708..e4995576bdcb31293c663d9bb1acd4590bb07f60 100644
--- a/lib/runtime/dart/js.js
+++ b/lib/runtime/dart/js.js
@@ -153,8 +153,7 @@ dart_library.library('dart/js', null, /* Imports */[
_fromJs(jsObject) {
super._fromJs(jsObject);
}
- apply(args, opts) {
- let thisArg = opts && 'thisArg' in opts ? opts.thisArg : null;
+ apply(args, {thisArg = null} = {}) {
return _convertToDart(this[_jsObject].apply(_convertToJS(thisArg), args == null ? null : core.List.from(args[dartx.map](_convertToJS))));
}
}
@@ -176,7 +175,7 @@ dart_library.library('dart/js', null, /* Imports */[
from(other) {
super._fromJs((() => {
let _ = [];
- _[dartx.addAll](other[dartx.map](dart.as(_convertToJS, __CastType0)));
+ _[dartx.addAll](other[dartx.map](dart.as(_convertToJS, __CastType0$(E))));
return _;
})());
}

Powered by Google App Engine
This is Rietveld 408576698