mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #18372 - tigercosmos:userTimingApi, r=ferjm
TEST: fix and add case of po-observe.any.js <!-- Please describe your changes on the following line: --> 1. implementing step 3 from the [`PerformanceObserver.observe()`](https://w3c.github.io/performance-timeline/#dom-performanceobserver-observe()) method spec properly. 2. also add cases about step 1 & 2 work on the top of #18283 r? @ferjm --- <!-- 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 #18285 (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/18372) <!-- Reviewable:end -->
This commit is contained in:
commit
6a09b1d21a
4 changed files with 2 additions and 14 deletions
|
@ -163,7 +163,7 @@ impl Performance {
|
|||
observer.set_entries(obs_entries);
|
||||
}
|
||||
let mut observers = self.observers.borrow_mut();
|
||||
match observers.iter().position(|o| &(*o.observer) == observer) {
|
||||
match observers.iter().position(|o| *o.observer == *observer) {
|
||||
// If the observer is already in the list, we only update the observed
|
||||
// entry types.
|
||||
Some(p) => observers[p].entry_types = entry_types,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue