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

Unified Diff: lib/runtime/_classes.js

Issue 1347453002: fix a few more codegen issues: (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: run the tests too Created 5 years, 3 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 | lib/runtime/_types.js » ('j') | test/codegen/expect/html_input.html » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/_classes.js
diff --git a/lib/runtime/_classes.js b/lib/runtime/_classes.js
index 4497fb7aa54ea81e176ee38b2d3f7f90363f7a8d..9487e077b699893b4b3e8a324cf79d3a0be72cfc 100644
--- a/lib/runtime/_classes.js
+++ b/lib/runtime/_classes.js
@@ -393,6 +393,10 @@ dart_library.library('dart_runtime/_classes', null, /* Imports */[
function canonicalMember(obj, name) {
if (obj != null && obj[_extensionType]) return dartx[name];
+ // Check for certain names that we can't use in JS
+ if (name == 'constructor' || name == 'prototype') {
+ name = '+' + name;
+ }
return name;
}
exports.canonicalMember = canonicalMember;
« no previous file with comments | « no previous file | lib/runtime/_types.js » ('j') | test/codegen/expect/html_input.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698