mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:31:50 +00:00
[vm] Skip functions in source reports if their token pos is unknown
Change-Id: I2f953ee5745dd7193a77098d0e83d5ac247f5886 Reviewed-on: https://dart-review.googlesource.com/43720 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Jens Johansen <jensj@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
parent
982fc59531
commit
df8deddfa5
|
@ -65,6 +65,13 @@ bool SourceReport::IsReportRequested(ReportKind report_kind) {
|
|||
}
|
||||
|
||||
bool SourceReport::ShouldSkipFunction(const Function& func) {
|
||||
// TODO(32315): Verify that the check is still needed after the issue is
|
||||
// resolved.
|
||||
if (!func.token_pos().IsReal() || !func.end_token_pos().IsReal()) {
|
||||
// At least one of the token positions is not known.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (script_ != NULL && !script_->IsNull()) {
|
||||
if (func.script() != script_->raw()) {
|
||||
// The function is from the wrong script.
|
||||
|
|
Loading…
Reference in a new issue