mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #18370 - pylbrecht:observer, r=ferjm
An observer disconnected after a mark must receive the mark <!-- Please describe your changes on the following line: --> I worked on top of #18283 as suggested [here](https://github.com/servo/servo/issues/18284#issuecomment-326043873). 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 #18284 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes <!-- 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/18370) <!-- Reviewable:end -->
This commit is contained in:
commit
867d542261
2 changed files with 9 additions and 13 deletions
|
@ -182,6 +182,15 @@ impl Performance {
|
|||
Some(p) => p,
|
||||
None => return,
|
||||
};
|
||||
|
||||
if self.pending_notification_observers_task.get() {
|
||||
if let Some(o) = observers.iter().nth(index) {
|
||||
DOMPerformanceObserver::new(&self.global(),
|
||||
o.observer.callback(),
|
||||
o.observer.entries()).notify();
|
||||
}
|
||||
}
|
||||
|
||||
observers.remove(index);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
[po-disconnect.any.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[An observer disconnected after a mark must receive the mark]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
||||
[po-disconnect.any.worker.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[An observer disconnected after a mark must receive the mark]
|
||||
expected: TIMEOUT
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue