fix observer comparing and test

This commit is contained in:
tigercosmos 2017-08-30 17:52:18 +02:00
parent 84ac9f384a
commit 3877e9162f
4 changed files with 2 additions and 14 deletions

View file

@ -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,

View file

@ -586431,7 +586431,7 @@
"testharness"
],
"performance-timeline/po-observe.any.js": [
"a15299a6128e4fcb62fa074eba2e0fc07e4e3fe8",
"78b32c64ddb9e6da80b57fb1f91576dd0f59b13a",
"testharness"
],
"performance-timeline/po-resource.html": [

View file

@ -1,11 +0,0 @@
[po-observe.any.worker.html]
type: testharness
[replace observer if already present]
expected: FAIL
[po-observe.any.html]
type: testharness
[replace observer if already present]
expected: FAIL

View file

@ -35,7 +35,6 @@
async_test(function (t) {
var observer = new PerformanceObserver(
t.step_func(function (entryList, obs) {
assert_equals(observer, obs, "observer is second parameter");
checkEntries(entryList.getEntries(),
[{ entryType: "measure", name: "measure1"}]);
observer.disconnect();