mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Take WorkerGlobalScope's worker_id out of its Option.
Unsurprisingly, every worker has an id, so there is no need to wrap it in an Option.
This commit is contained in:
parent
1809748dc1
commit
bd04cecceb
4 changed files with 8 additions and 8 deletions
|
@ -119,7 +119,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
parent_sender: Box<ScriptChan+Send>,
|
||||
own_sender: Sender<(TrustedWorkerAddress, ScriptMsg)>,
|
||||
receiver: Receiver<(TrustedWorkerAddress, ScriptMsg)>,
|
||||
worker_id: Option<WorkerId>)
|
||||
worker_id: WorkerId)
|
||||
-> DedicatedWorkerGlobalScope {
|
||||
DedicatedWorkerGlobalScope {
|
||||
workerglobalscope: WorkerGlobalScope::new_inherited(
|
||||
|
@ -146,7 +146,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
parent_sender: Box<ScriptChan+Send>,
|
||||
own_sender: Sender<(TrustedWorkerAddress, ScriptMsg)>,
|
||||
receiver: Receiver<(TrustedWorkerAddress, ScriptMsg)>,
|
||||
worker_id: Option<WorkerId>)
|
||||
worker_id: WorkerId)
|
||||
-> Root<DedicatedWorkerGlobalScope> {
|
||||
let scope = box DedicatedWorkerGlobalScope::new_inherited(
|
||||
worker_url, id, mem_profiler_chan, devtools_chan, devtools_sender, devtools_port,
|
||||
|
@ -170,7 +170,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
parent_sender: Box<ScriptChan+Send>,
|
||||
own_sender: Sender<(TrustedWorkerAddress, ScriptMsg)>,
|
||||
receiver: Receiver<(TrustedWorkerAddress, ScriptMsg)>,
|
||||
worker_id: Option<WorkerId>) {
|
||||
worker_id: WorkerId) {
|
||||
let serialized_worker_url = worker_url.serialize();
|
||||
spawn_named(format!("WebWorker for {}", serialized_worker_url), move || {
|
||||
task_state::initialize(SCRIPT | IN_WORKER);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue