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

Unified Diff: pkg/analysis_server/lib/src/domain_execution.dart

Issue 1157823002: Send 'execution.launchData' only after full resolution. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/analysis_server/lib/src/domain_execution.dart
diff --git a/pkg/analysis_server/lib/src/domain_execution.dart b/pkg/analysis_server/lib/src/domain_execution.dart
index 145f1ba8fb64e77806916bd3e840edadd7b1ff47..88cc8705faf72ce61faecff051802e677a76e473 100644
--- a/pkg/analysis_server/lib/src/domain_execution.dart
+++ b/pkg/analysis_server/lib/src/domain_execution.dart
@@ -154,11 +154,19 @@ class ExecutionDomainHandler implements RequestHandler {
ServerPerformanceStatistics.executionNotifications.makeCurrentWhile(() {
Source source = notice.source;
String filePath = source.fullName;
+ // check files
+ bool isDartFile = notice.resolvedDartUnit != null;
+ bool isHtmlFile = AnalysisEngine.isHtmlFileName(filePath);
Brian Wilkerson 2015/05/24 15:53:31 Why not "notice.resolvedHtmlUnit != null"?
+ if (!isDartFile && !isHtmlFile) {
+ return;
+ }
+ // prepare context
AnalysisContext context = server.getContainingContext(filePath);
if (context == null) {
return;
}
- if (AnalysisEngine.isDartFileName(filePath)) {
+ // analyze the file
+ if (isDartFile) {
ExecutableKind kind = ExecutableKind.NOT_EXECUTABLE;
if (context.isClientLibrary(source)) {
kind = ExecutableKind.CLIENT;
@@ -171,7 +179,7 @@ class ExecutionDomainHandler implements RequestHandler {
server.sendNotification(
new ExecutionLaunchDataParams(filePath, kind: kind)
.toNotification());
- } else if (AnalysisEngine.isHtmlFileName(filePath)) {
+ } else if (isHtmlFile) {
List<Source> libraries = context.getLibrariesReferencedFromHtml(source);
server.sendNotification(new ExecutionLaunchDataParams(filePath,
referencedFiles: _getFullNames(libraries)).toNotification());
« 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