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

Unified Diff: lib/src/utils.dart

Issue 1170813008: fixes detection of SDK libraries (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 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: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 3ebae7785452549532d1662719120c6ff52c067d..979faf306e4e7bbc6d5dfc95c3442541d8772857 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -465,3 +465,7 @@ SourceSpanWithContext createSpanHelper(
var lineText = content.substring(lineStart, lineEnd);
return new SourceSpanWithContext(startLoc, endLoc, text, lineText);
}
+
+bool isInlineJS(Element e) => e is FunctionElement &&
+ e.library.source.uri.toString() == 'dart:_foreign_helper' &&
+ e.name == 'JS';

Powered by Google App Engine
This is Rietveld 408576698