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

Unified Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 929503004: dart2js: Don't emit fields that are named "eval" or "arguments". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/use_strict_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 36663d9704d1d7c2667ce9b410625bbf8af7eb8e..28f8e5a2e45c2405e77deae7ed128bc8ba6d24a6 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -25,7 +25,12 @@ class Namer implements ClosureNamer {
];
static const reservedPropertySymbols =
- const <String>["__proto__", "prototype", "constructor", "call"];
+ const <String>[
+ "__proto__", "prototype", "constructor", "call",
+ // "use strict" disallows the use of "arguments" and "eval" as
+ // variable names or property names. See ECMA-262, Edition 5.1,
+ // section 11.1.5 (for the property names).
+ "eval", "arguments"];
// Symbols that we might be using in our JS snippets.
static const reservedGlobalSymbols = const <String>[
« no previous file with comments | « no previous file | tests/compiler/dart2js/use_strict_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698