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

Unified Diff: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart

Issue 2944073003: Reapply "Minor adjustment to usage of the ClosureClassRepresentation interface." (Closed)
Patch Set: . Created 3 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 692676b58445d4f8d4c11e4d0109e089604a7e89..b5569e757c0f88bd4f1c5131d2f9f655db2826bd 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -128,12 +128,11 @@ class RuntimeTypeGenerator {
if (!method.isAbstract) {
ClosureRepresentationInfo closureData =
_closureDataLookup.getClosureRepresentationInfo(method);
- if (closureData != null) {
+ if (closureData.isClosure && closureData.thisLocal != null) {
Siggi Cherem (dart-lang) 2017/06/20 00:30:22 is closureData never null now? Will it ever be the
ClosureFieldElement thisLocal = closureData.thisFieldEntity;
- if (thisLocal != null) {
- jsAst.Name thisName = _namer.instanceFieldPropertyName(thisLocal);
- thisAccess = js('this.#', thisName);
- }
+ assert(thisLocal != null);
+ jsAst.Name thisName = _namer.instanceFieldPropertyName(thisLocal);
+ thisAccess = js('this.#', thisName);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698