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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine; | 8 library engine; |
| 9 | 9 |
| 10 import "dart:math" as math; | 10 import "dart:math" as math; |
| (...skipping 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4677 */ | 4677 */ |
| 4678 SourceEntry _recordGetContentsTask(GetContentTask task) { | 4678 SourceEntry _recordGetContentsTask(GetContentTask task) { |
| 4679 if (!task.isComplete) { | 4679 if (!task.isComplete) { |
| 4680 return null; | 4680 return null; |
| 4681 } | 4681 } |
| 4682 Source source = task.source; | 4682 Source source = task.source; |
| 4683 SourceEntry sourceEntry = _cache.get(source); | 4683 SourceEntry sourceEntry = _cache.get(source); |
| 4684 CaughtException thrownException = task.exception; | 4684 CaughtException thrownException = task.exception; |
| 4685 if (thrownException != null) { | 4685 if (thrownException != null) { |
| 4686 sourceEntry.recordContentError(thrownException); | 4686 sourceEntry.recordContentError(thrownException); |
| 4687 // TODO(scheglov) should we add separate ContentErrorCode and | |
| 4688 // SourceEntry.CONTENT_ERRORS entry? | |
| 4689 if (sourceEntry is DartEntry) { | |
|
Brian Wilkerson
2015/02/11 00:49:09
We probably shouldn't limit this to only Dart file
| |
| 4690 sourceEntry.setValue( | |
| 4691 DartEntry.SCAN_ERRORS, | |
| 4692 <AnalysisError>[ | |
| 4693 new AnalysisError.con1(source, ScannerErrorCode.UNABLE_GET_CONTE NT)]); | |
|
scheglov
2015/02/10 23:26:14
Would it be better to create the error in GetConte
Brian Wilkerson
2015/02/11 00:49:10
Probably, but we might want to wait for the task m
| |
| 4694 ChangeNoticeImpl notice = _getNotice(source); | |
| 4695 notice.setErrors(sourceEntry.allErrors, null); | |
| 4696 } | |
| 4687 _workManager.remove(source); | 4697 _workManager.remove(source); |
| 4688 throw new AnalysisException('<rethrow>', thrownException); | 4698 throw new AnalysisException('<rethrow>', thrownException); |
| 4689 } | 4699 } |
| 4690 sourceEntry.modificationTime = task.modificationTime; | 4700 sourceEntry.modificationTime = task.modificationTime; |
| 4691 sourceEntry.setValue(SourceEntry.CONTENT, task.content); | 4701 sourceEntry.setValue(SourceEntry.CONTENT, task.content); |
| 4692 return sourceEntry; | 4702 return sourceEntry; |
| 4693 } | 4703 } |
| 4694 | 4704 |
| 4695 /** | 4705 /** |
| 4696 * Record the results produced by performing a [IncrementalAnalysisTask]. | 4706 * Record the results produced by performing a [IncrementalAnalysisTask]. |
| (...skipping 7673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12370 if (element.id == _id) { | 12380 if (element.id == _id) { |
| 12371 result = element; | 12381 result = element; |
| 12372 throw new _ElementByIdFinderException(); | 12382 throw new _ElementByIdFinderException(); |
| 12373 } | 12383 } |
| 12374 super.visitElement(element); | 12384 super.visitElement(element); |
| 12375 } | 12385 } |
| 12376 } | 12386 } |
| 12377 | 12387 |
| 12378 class _ElementByIdFinderException { | 12388 class _ElementByIdFinderException { |
| 12379 } | 12389 } |
| OLD | NEW |