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

Side by Side Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 1414733006: Issue 24639. Check the correct object for null. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/html_work_manager.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.src.task.dart_work_manager; 5 library analyzer.src.task.dart_work_manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/engine.dart' 10 import 'package:analyzer/src/generated/engine.dart'
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 Source library = target.library; 393 Source library = target.library;
394 if (context.exists(library)) { 394 if (context.exists(library)) {
395 librarySourceQueue.add(library); 395 librarySourceQueue.add(library);
396 } 396 }
397 } 397 }
398 } 398 }
399 // Invalidate targets and values. 399 // Invalidate targets and values.
400 unitTargets.forEach(partition.remove); 400 unitTargets.forEach(partition.remove);
401 for (Source dartSource in dartSources) { 401 for (Source dartSource in dartSources) {
402 CacheEntry entry = partition.get(dartSource); 402 CacheEntry entry = partition.get(dartSource);
403 if (dartSource != null) { 403 if (entry != null) {
404 // TODO(scheglov) we invalidate too much. 404 // TODO(scheglov) we invalidate too much.
405 // Would be nice to invalidate just URLs resolution. 405 // Would be nice to invalidate just URLs resolution.
406 entry.setState(PARSED_UNIT, CacheState.INVALID); 406 entry.setState(PARSED_UNIT, CacheState.INVALID);
407 entry.setState(IMPORTED_LIBRARIES, CacheState.INVALID); 407 entry.setState(IMPORTED_LIBRARIES, CacheState.INVALID);
408 entry.setState(EXPLICITLY_IMPORTED_LIBRARIES, CacheState.INVALID); 408 entry.setState(EXPLICITLY_IMPORTED_LIBRARIES, CacheState.INVALID);
409 entry.setState(EXPORTED_LIBRARIES, CacheState.INVALID); 409 entry.setState(EXPORTED_LIBRARIES, CacheState.INVALID);
410 entry.setState(INCLUDED_PARTS, CacheState.INVALID); 410 entry.setState(INCLUDED_PARTS, CacheState.INVALID);
411 } 411 }
412 } 412 }
413 } 413 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 467 }
468 } 468 }
469 469
470 bool _shouldErrorsBeComputed(Source source) => 470 bool _shouldErrorsBeComputed(Source source) =>
471 context.shouldErrorsBeAnalyzed(source, null); 471 context.shouldErrorsBeAnalyzed(source, null);
472 472
473 static bool _isDartSource(AnalysisTarget target) { 473 static bool _isDartSource(AnalysisTarget target) {
474 return target is Source && AnalysisEngine.isDartFileName(target.fullName); 474 return target is Source && AnalysisEngine.isDartFileName(target.fullName);
475 } 475 }
476 } 476 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/html_work_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698