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

Unified Diff: dart/sdk/lib/_internal/lib/js_mirrors.dart

Issue 19571002: Fix a few issues related to mirrors: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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: dart/sdk/lib/_internal/lib/js_mirrors.dart
diff --git a/dart/sdk/lib/_internal/lib/js_mirrors.dart b/dart/sdk/lib/_internal/lib/js_mirrors.dart
index a3dbfc6dee8df23dc78b1e6caf9fdd6540a4ebc7..ada54164b34276d916628106432f730312dba25f 100644
--- a/dart/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/dart/sdk/lib/_internal/lib/js_mirrors.dart
@@ -562,8 +562,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror
if (method.isGetter) {
// TODO(ahe): This is a hack to remove getters corresponding to a field.
- String name = n(method.simpleName);
- if (fields[s(name)] != null) continue;
+ if (fields[method.simpleName] != null) continue;
result[method.simpleName] = method;
}
@@ -756,12 +755,17 @@ class JsVariableMirror extends JsDeclarationMirror implements VariableMirror {
accessorName = accessorName.substring(0, divider);
jsName = accessorName.substring(divider + 1);
}
- var unmangledName =
- (isStatic ? mangledGlobalNames : mangledNames)[accessorName];
+ var unmangledName;
+ if (isStatic) {
+ unmangledName = mangledGlobalNames[accessorName];
+ } else {
+ String getterPrefix = JS('String', 'init.getterPrefix');
+ unmangledName = mangledNames['$getterPrefix$accessorName'];
+ }
if (unmangledName == null) unmangledName = accessorName;
if (!hasSetter) {
// TODO(ahe): This is a hack to handle checked setters in checked mode.
- var setterName = s('$accessorName=');
+ var setterName = s('$unmangledName=');
for (JsMethodMirror method in owner._methods) {
if (method.simpleName == setterName) {
isFinal = false;

Powered by Google App Engine
This is Rietveld 408576698