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

Unified Diff: lib/src/server/dependency_graph.dart

Issue 1523353002: Fixes for html report (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Reformat Created 5 years 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 | « lib/src/report/html_reporter.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/server/dependency_graph.dart
diff --git a/lib/src/server/dependency_graph.dart b/lib/src/server/dependency_graph.dart
index 31a2f9e844f49ad4fff8d3f3ccfd8769488e2fdf..61f13260e35a097bc21b3e0d827cb98cc1558e86 100644
--- a/lib/src/server/dependency_graph.dart
+++ b/lib/src/server/dependency_graph.dart
@@ -32,6 +32,7 @@ import '../compiler.dart' show defaultRuntimeFiles;
import '../info.dart';
import '../options.dart';
import '../report.dart';
+import '../report/html_reporter.dart';
/// Holds references to all source nodes in the import graph. This is mainly
/// used as a level of indirection to ensure that each source has a canonical
@@ -146,6 +147,8 @@ abstract class SourceNode {
}
}
+ void clearSummary() {}
+
void saveUpdatedContents() {}
String toString() {
@@ -184,13 +187,19 @@ class HtmlSourceNode extends SourceNode {
super(graph, uri, source);
@override
+ void clearSummary() {
+ var reporter = graph._reporter;
+ if (reporter is HtmlReporter) {
+ reporter.reporter.clearHtml(uri);
+ } else if (reporter is SummaryReporter) {
+ reporter.clearHtml(uri);
+ }
+ }
+
+ @override
void update() {
super.update();
if (needsRebuild) {
- var reporter = graph._reporter;
- if (reporter is SummaryReporter) {
- reporter.clearHtml(uri);
- }
document = html.parse(contents, generateSpans: true);
var newScripts = new Set<DartSourceNode>();
var tags = document.querySelectorAll('script[type="application/dart"]');
@@ -291,15 +300,20 @@ class DartSourceNode extends SourceNode {
}
@override
+ void clearSummary() {
+ var reporter = graph._reporter;
+ if (reporter is HtmlReporter) {
+ reporter.reporter.clearLibrary(uri);
+ } else if (reporter is SummaryReporter) {
+ reporter.clearLibrary(uri);
+ }
+ }
+
+ @override
void update() {
super.update();
if (needsRebuild) {
- var reporter = graph._reporter;
- if (reporter is SummaryReporter) {
- reporter.clearLibrary(uri);
- }
-
// If the defining compilation-unit changed, the structure might have
// changed.
var unit = parseDirectives(contents, name: _source.fullName);
« no previous file with comments | « lib/src/report/html_reporter.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698