Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 _INFINITY = 1000 | 5 _INFINITY = 1000 |
| 6 | 6 |
| 7 | 7 |
| 8 class Result(object): | 8 class Result(object): |
| 9 """Represents findit culprit result.""" | 9 """Represents findit culprit result.""" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 } | 30 } |
| 31 | 31 |
| 32 def ToString(self): | 32 def ToString(self): |
| 33 if not self.file_to_stack_infos: | 33 if not self.file_to_stack_infos: |
| 34 return '' | 34 return '' |
| 35 | 35 |
| 36 lines = [] | 36 lines = [] |
| 37 for file_path, stack_infos in self.file_to_stack_infos.iteritems(): | 37 for file_path, stack_infos in self.file_to_stack_infos.iteritems(): |
| 38 line_parts = [] | 38 line_parts = [] |
| 39 for frame, _ in stack_infos: | 39 for frame, _ in stack_infos: |
| 40 line_parts.append('%s (#%d)' % (frame.function, frame.index)) | 40 line_parts.append('frame #%d' % frame.index) |
|
stgao
2016/06/16 17:32:04
Could we avoid including the change from the other
Sharu Jiang
2016/06/21 20:28:49
Yes, I uploaded separate cl for this, after rebase
| |
| 41 | 41 |
| 42 lines.append('Changed file %s crashed in %s' % ( | 42 lines.append('Changed file %s crashed in %s' % ( |
| 43 file_path, ', '.join(line_parts))) | 43 file_path, ', '.join(line_parts))) |
| 44 | 44 |
| 45 return '\n'.join(lines) | 45 return '\n'.join(lines) |
| 46 | 46 |
| 47 def __str__(self): | 47 def __str__(self): |
| 48 return self.ToString() | 48 return self.ToString() |
| 49 | 49 |
| 50 | 50 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 for changelog in changelogs: | 129 for changelog in changelogs: |
| 130 if self.ignore_cls and changelog.revision in self.ignore_cls: | 130 if self.ignore_cls and changelog.revision in self.ignore_cls: |
| 131 continue | 131 continue |
| 132 | 132 |
| 133 if changelog.revision not in self: | 133 if changelog.revision not in self: |
| 134 self[changelog.revision] = MatchResult(changelog, dep_path) | 134 self[changelog.revision] = MatchResult(changelog, dep_path) |
| 135 | 135 |
| 136 match_result = self[changelog.revision] | 136 match_result = self[changelog.revision] |
| 137 | 137 |
| 138 match_result.Update(file_path, stack_infos, blame) | 138 match_result.Update(file_path, stack_infos, blame) |
| OLD | NEW |