Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis_server.src.status.get_handler; | 5 library analysis_server.src.status.get_handler; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 } | 370 } |
| 371 | 371 |
| 372 /** | 372 /** |
| 373 * Return `true` if the given analysis [context] has at least one entry with | 373 * Return `true` if the given analysis [context] has at least one entry with |
| 374 * an exception. | 374 * an exception. |
| 375 */ | 375 */ |
| 376 bool _hasException(InternalAnalysisContext context) { | 376 bool _hasException(InternalAnalysisContext context) { |
| 377 MapIterator<AnalysisTarget, CacheEntry> iterator = | 377 MapIterator<AnalysisTarget, CacheEntry> iterator = |
| 378 context.analysisCache.iterator(); | 378 context.analysisCache.iterator(); |
| 379 while (iterator.moveNext()) { | 379 while (iterator.moveNext()) { |
| 380 if (iterator.value.exception != null) { | 380 CacheEntry entry = iterator.value; |
| 381 if (entry != null && entry.exception != null) { | |
|
scheglov
2015/11/11 22:46:12
Should we log / write-to-the-page the key for whic
| |
| 381 return true; | 382 return true; |
| 382 } | 383 } |
| 383 } | 384 } |
| 384 return false; | 385 return false; |
| 385 } | 386 } |
| 386 | 387 |
| 387 /** | 388 /** |
| 388 * Return the folder in the [folderMap] with which the given [context] is | 389 * Return the folder in the [folderMap] with which the given [context] is |
| 389 * associated. | 390 * associated. |
| 390 */ | 391 */ |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1936 */ | 1937 */ |
| 1937 static String makeLink( | 1938 static String makeLink( |
| 1938 String path, Map<String, String> params, String innerHtml, | 1939 String path, Map<String, String> params, String innerHtml, |
| 1939 [bool hasError = false]) { | 1940 [bool hasError = false]) { |
| 1940 Uri uri = new Uri(path: path, queryParameters: params); | 1941 Uri uri = new Uri(path: path, queryParameters: params); |
| 1941 String href = HTML_ESCAPE.convert(uri.toString()); | 1942 String href = HTML_ESCAPE.convert(uri.toString()); |
| 1942 String classAttribute = hasError ? ' class="error"' : ''; | 1943 String classAttribute = hasError ? ' class="error"' : ''; |
| 1943 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 1944 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 1944 } | 1945 } |
| 1945 } | 1946 } |
| OLD | NEW |