mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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
|
@ -46,7 +46,7 @@ pub enum WorkerGlobalScopeTypeId {
|
|||
#[dom_struct]
|
||||
pub struct WorkerGlobalScope {
|
||||
eventtarget: EventTarget,
|
||||
worker_id: Option<WorkerId>,
|
||||
worker_id: WorkerId,
|
||||
worker_url: Url,
|
||||
runtime: Rc<Runtime>,
|
||||
next_worker_id: Cell<WorkerId>,
|
||||
|
@ -84,7 +84,7 @@ impl WorkerGlobalScope {
|
|||
devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,
|
||||
devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||
constellation_chan: ConstellationChan,
|
||||
worker_id: Option<WorkerId>)
|
||||
worker_id: WorkerId)
|
||||
-> WorkerGlobalScope {
|
||||
WorkerGlobalScope {
|
||||
eventtarget: EventTarget::new_inherited(EventTargetTypeId::WorkerGlobalScope(type_id)),
|
||||
|
@ -144,7 +144,7 @@ impl WorkerGlobalScope {
|
|||
&self.worker_url
|
||||
}
|
||||
|
||||
pub fn get_worker_id(&self) -> Option<WorkerId> {
|
||||
pub fn get_worker_id(&self) -> WorkerId {
|
||||
self.worker_id.clone()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue