Make Performance Timeline API work in Workers

This commit is contained in:
Fernando Jiménez Moreno 2017-08-30 17:52:18 +02:00
parent 449ffb23ac
commit fb843c251a
20 changed files with 146 additions and 128 deletions

View file

@ -710,7 +710,8 @@ impl WindowMethods for Window {
// NavigationTiming/Overview.html#sec-window.performance-attribute
fn Performance(&self) -> Root<Performance> {
self.performance.or_init(|| {
Performance::new(self, self.navigation_start.get(),
let global_scope = self.upcast::<GlobalScope>();
Performance::new(global_scope, self.navigation_start.get(),
self.navigation_start_precise.get())
})
}