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

Unified Diff: lib/compiler/implementation/native_handler.dart

Issue 10834243: Reduce usage of .enclosingElement to get enclosing class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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/compiler/implementation/native_handler.dart
diff --git a/lib/compiler/implementation/native_handler.dart b/lib/compiler/implementation/native_handler.dart
index 8592b03be9d7b0cb08543242e23b7caa2ba2229d..9240c555e22a32b454cf65371200e34e3860926c 100644
--- a/lib/compiler/implementation/native_handler.dart
+++ b/lib/compiler/implementation/native_handler.dart
@@ -188,7 +188,7 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
// not a JS property on the DOM types, returns the type name.
if (element.name == const SourceString('typeName')
&& element.isGetter()
- && nativeEmitter.toNativeName(element.enclosingElement) == 'DOMType') {
+ && nativeEmitter.toNativeName(element.getEnclosingClass()) == 'DOMType') {
Element methodElement =
compiler.findHelper(const SourceString('getTypeNameOf'));
HStatic method = new HStatic(methodElement);

Powered by Google App Engine
This is Rietveld 408576698