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

Unified Diff: lib/runtime/harmony_feature_check.js

Issue 1186683005: dart:mirrors (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: lib/runtime/harmony_feature_check.js
diff --git a/lib/runtime/harmony_feature_check.js b/lib/runtime/harmony_feature_check.js
index c2f80e44dd5139a6e15d73f3cb1a0397194c46b5..33003066a1adccae5b61aba04b37e7144633fb06 100644
--- a/lib/runtime/harmony_feature_check.js
+++ b/lib/runtime/harmony_feature_check.js
@@ -10,8 +10,9 @@
'class C {' +
'constructor(x) { this.x = x; };' +
'["foo"]() { return x => this.x + x; };' +
+ 'bar(args) { return this.foo()(...args); };' +
'};' +
- 'return new C(42).foo()(100);');
+ 'return new C(42).bar([100]);');
if (f() == 142) return; // supported!
} catch (e) {
}
@@ -19,7 +20,8 @@
var message = 'This script needs EcmaScript 6 features ' +
'like `class` and `=>`. Please run in a browser with support, ' +
'for example: chrome --js-flags="--harmony-arrow-functions' +
- ' --harmony-classes --harmony-computed-property-names"';
+ ' --harmony-classes --harmony-computed-property-names' +
+ ' --harmony-spreadcalls"';
console.error(message);
alert(message);

Powered by Google App Engine
This is Rietveld 408576698