diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-09-01 15:04:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 15:04:56 -0500 |
commit | 2550b47decbc9876d96a459e399658ca54998bda (patch) | |
tree | f6d5222798863d19c85014bd5209befd416fd27c /components/script/dom/paintrenderingcontext2d.rs | |
parent | fd833d9f18cd9196502b9768ab0ac8c1498b2f68 (diff) | |
parent | 1c0f569bb337b8868ed2e77de4c3f14e3bb8c4e6 (diff) | |
download | servo-2550b47decbc9876d96a459e399658ca54998bda.tar.gz servo-2550b47decbc9876d96a459e399658ca54998bda.zip |
Auto merge of #18272 - mateon1:fix/profile-sorted-assert, r=emilio
Correct "is sorted" check in profile statistics
<!-- Please describe your changes on the following line: -->
Correct the debug_assert check for whether or not statistics collected by the --profile flag are sorted.
I'm not sure how I could add a test for this change, and whether that is necessary.
I also wonder if it makes sense to replace the sort_by calls (currently using explicit comparisons) in this file with something like
```
data.sort_by(|a, b| a.partial_cmp(b).expect("no NaN in collected statistics"))
```
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18270 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18272)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/paintrenderingcontext2d.rs')
0 files changed, 0 insertions, 0 deletions