Skip to content

Commit

Permalink
when starting a new serviceworker, take origin from scope things
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed May 1, 2020
1 parent 9efc02d commit 1b4162a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/script/dom/serviceworkerglobalscope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,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();
let origin = scope_url.origin();
thread::Builder::new()
.name(format!("ServiceWorker for {}", serialized_worker_url))
.spawn(move || {
Expand Down

0 comments on commit 1b4162a

Please sign in to comment.