mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
WorkerId
changed to type UUID.
This commit is contained in:
parent
5c56e661ca
commit
d5475fbc9f
9 changed files with 19 additions and 18 deletions
|
@ -46,7 +46,7 @@ use crate::task_source::TaskSourceName;
|
|||
use crate::timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
|
||||
use crate::timers::{OneshotTimers, TimerCallback};
|
||||
use content_security_policy::CspList;
|
||||
use devtools_traits::{PageError, ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use devtools_traits::{PageError, ScriptToDevtoolsControlMsg};
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -80,7 +80,6 @@ use std::rc::Rc;
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use time::{get_time, Timespec};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
pub struct AutoCloseWorker(Arc<AtomicBool>);
|
||||
|
@ -95,7 +94,6 @@ impl Drop for AutoCloseWorker {
|
|||
pub struct GlobalScope {
|
||||
eventtarget: EventTarget,
|
||||
crypto: MutNullableDom<Crypto>,
|
||||
next_worker_id: WorkerId,
|
||||
|
||||
/// The message-port router id for this global, if it is managing ports.
|
||||
message_port_state: DomRefCell<MessagePortState>,
|
||||
|
@ -348,7 +346,6 @@ impl GlobalScope {
|
|||
message_port_state: DomRefCell::new(MessagePortState::UnManaged),
|
||||
eventtarget: EventTarget::new_inherited(),
|
||||
crypto: Default::default(),
|
||||
next_worker_id: WorkerId(Uuid::new_v4().to_string()),
|
||||
pipeline_id,
|
||||
devtools_wants_updates: Default::default(),
|
||||
console_timers: DomRefCell::new(Default::default()),
|
||||
|
@ -927,12 +924,6 @@ impl GlobalScope {
|
|||
self.crypto.or_init(|| Crypto::new(self))
|
||||
}
|
||||
|
||||
/// Get next worker id.
|
||||
pub fn get_next_worker_id(&self) -> WorkerId {
|
||||
let worker_id = self.next_worker_id.clone();
|
||||
worker_id
|
||||
}
|
||||
|
||||
pub fn live_devtools_updates(&self) -> bool {
|
||||
self.devtools_wants_updates.get()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue