зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #18370 - An observer disconnected after a mark must receive the mark (from pylbrecht:observer); r=ferjm
<!-- 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. --> Source-Repo: https://github.com/servo/servo Source-Revision: 867d542261336d918177f8780ef915b7ec84e3ba --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 79691b6f8e710beeab4ca8ba260f4ee0869914a7
This commit is contained in:
Родитель
2f4e269a50
Коммит
7315212211
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче