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

Unified Diff: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart

Issue 2060183002: Serialize metadata (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 4 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
Index: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index 448f97992225ff4ddf68fdf4c064f58cb67f2812..e2ebe39130a3b4ea5222bcd94f3abdba770da85f 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -5,6 +5,7 @@
/// Analysis to determine how to generate code for typed JavaScript interop.
library compiler.src.js_backend.js_interop_analysis;
+import '../common.dart';
import '../constants/values.dart'
show ConstantValue, ConstructedConstantValue, StringConstantValue;
import '../diagnostics/messages.dart' show MessageKind;
@@ -54,6 +55,8 @@ class JsInteropAnalysis {
void processJsInteropAnnotation(Element e) {
for (MetadataAnnotation annotation in e.implementation.metadata) {
+ // TODO(johnniwinther): Avoid processing unresolved elements.
+ if (annotation.constant == null) continue;
ConstantValue constant =
backend.compiler.constants.getConstantValue(annotation.constant);
if (constant == null || constant is! ConstructedConstantValue) continue;
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698