Change RequestInit origin type to ImmutableOrigin

This commit is contained in:
Fausto Núñez Alberro 2017-04-26 01:07:31 +02:00 committed by Fausto Núñez Alberro
parent 104e0b4730
commit 6032940fb8
32 changed files with 173 additions and 529 deletions

View file

@ -151,6 +151,7 @@ impl ServiceWorkerGlobalScope {
.. } = scope_things;
let serialized_worker_url = script_url.to_string();
let origin = GlobalScope::current().expect("No current global object").origin().immutable().clone();
thread::Builder::new().name(format!("ServiceWorker for {}", serialized_worker_url)).spawn(move || {
thread_state::initialize(SCRIPT | IN_WORKER);
let roots = RootCollection::new();
@ -164,10 +165,10 @@ impl ServiceWorkerGlobalScope {
destination: Destination::ServiceWorker,
credentials_mode: CredentialsMode::Include,
use_url_credentials: true,
origin: script_url,
pipeline_id: pipeline_id,
referrer_url: referrer_url,
referrer_policy: referrer_policy,
origin,
.. RequestInit::default()
};