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

Unified Diff: pkg/dev_compiler/lib/src/compiler/js_interop.dart

Issue 2962263002: fix #30030, fix #27327 - fix tearoffs and various Object member bugs (Closed)
Patch Set: fix Created 3 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: pkg/dev_compiler/lib/src/compiler/js_interop.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/js_interop.dart b/pkg/dev_compiler/lib/src/compiler/js_interop.dart
index 03d64b54bd4aaec35e241cb37bde8165985545f8..0883e414a2d10446eb16cea2369c2ee2f9590193 100644
--- a/pkg/dev_compiler/lib/src/compiler/js_interop.dart
+++ b/pkg/dev_compiler/lib/src/compiler/js_interop.dart
@@ -74,11 +74,8 @@ bool isNativeAnnotation(DartObjectImpl value) =>
/// the SDK), or `null` if there's none. This is used to control the name
/// under which functions are compiled and exported.
String getJSExportName(Element e) {
- var original = e;
- if (original is PropertyAccessorElement) e = original.variable;
- if (e.source.isInSystemLibrary) {
- var real = original.isSynthetic ? e : original;
- return getAnnotationName(real, isJSExportNameAnnotation) ?? e.name;
- }
- return e.name;
+ if (!e.source.isInSystemLibrary) return null;
+
+ e = e is PropertyAccessorElement && e.isSynthetic ? e.variable : e;
+ return getAnnotationName(e, isJSExportNameAnnotation);
}
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | pkg/dev_compiler/lib/src/compiler/js_typeref_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698