Make create_scope_things take a &GlobalScope

This commit is contained in:
Anthony Ramine 2016-10-03 18:58:03 +02:00
parent 83feb7dee3
commit de846f25a6
2 changed files with 7 additions and 10 deletions

View file

@ -1449,10 +1449,9 @@ impl ScriptThread {
None => return
};
if let Some(context) = self.root_browsing_context().find(pipeline_id) {
let window = context.active_window();
let global_ref = GlobalRef::Window(window.r());
let script_url = maybe_registration.get_installed().get_script_url();
let scope_things = ServiceWorkerRegistration::create_scope_things(global_ref, script_url);
let scope_things = ServiceWorkerRegistration::create_scope_things(
context.active_window().upcast(), script_url);
let _ = self.constellation_chan.send(ConstellationMsg::RegisterServiceWorker(scope_things, scope));
} else {
warn!("Registration failed for {}", scope);