From 354ed65c216456afb6b1242bbc9b2a27f0f525ef Mon Sep 17 00:00:00 2001 From: "P. Albrecht" Date: Mon, 4 Sep 2017 18:00:29 +0200 Subject: [PATCH] Observer receives pending marks before removed --- components/script/dom/performance.rs | 9 +++++++++ .../performance-timeline/po-disconnect.any.js.ini | 13 ------------- 2 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 tests/wpt/metadata/performance-timeline/po-disconnect.any.js.ini diff --git a/components/script/dom/performance.rs b/components/script/dom/performance.rs index 8e85543f8e3..7cef2f28010 100644 --- a/components/script/dom/performance.rs +++ b/components/script/dom/performance.rs @@ -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); } diff --git a/tests/wpt/metadata/performance-timeline/po-disconnect.any.js.ini b/tests/wpt/metadata/performance-timeline/po-disconnect.any.js.ini deleted file mode 100644 index 53a4c5c6b3e..00000000000 --- a/tests/wpt/metadata/performance-timeline/po-disconnect.any.js.ini +++ /dev/null @@ -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 -