mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #7238 - Wafflespeanut:workerglobal, r=Ms2ger
Improved field names for devtools-related channels... (for #6924) - I took this because the confusion was actually caused by me while working on #6829 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7238) <!-- Reviewable:end -->
This commit is contained in:
commit
0466766b2c
3 changed files with 24 additions and 24 deletions
|
@ -45,8 +45,8 @@ pub enum WorkerGlobalScopeTypeId {
|
|||
pub struct WorkerGlobalScopeInit {
|
||||
pub resource_task: ResourceTask,
|
||||
pub mem_profiler_chan: mem::ProfilerChan,
|
||||
pub devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
pub devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,
|
||||
pub to_devtools_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
pub from_devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,
|
||||
pub constellation_chan: ConstellationChan,
|
||||
pub worker_id: WorkerId,
|
||||
}
|
||||
|
@ -71,17 +71,17 @@ pub struct WorkerGlobalScope {
|
|||
#[ignore_heap_size_of = "Defined in std"]
|
||||
mem_profiler_chan: mem::ProfilerChan,
|
||||
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
||||
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
to_devtools_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
|
||||
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
||||
/// Optional `IpcSender` for sending the `DevtoolScriptControlMsg`
|
||||
/// to the server from within the worker
|
||||
devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,
|
||||
from_devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,
|
||||
|
||||
#[ignore_heap_size_of = "Defined in std"]
|
||||
/// This `Receiver` will be ignored later if the corresponding
|
||||
/// `IpcSender` doesn't exist
|
||||
devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||
|
||||
/// A flag to indicate whether the developer tools has requested live updates
|
||||
/// from the worker
|
||||
|
@ -96,7 +96,7 @@ impl WorkerGlobalScope {
|
|||
init: WorkerGlobalScopeInit,
|
||||
worker_url: Url,
|
||||
runtime: Rc<Runtime>,
|
||||
devtools_receiver: Receiver<DevtoolScriptControlMsg>)
|
||||
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>)
|
||||
-> WorkerGlobalScope {
|
||||
WorkerGlobalScope {
|
||||
eventtarget: EventTarget::new_inherited(EventTargetTypeId::WorkerGlobalScope(type_id)),
|
||||
|
@ -111,9 +111,9 @@ impl WorkerGlobalScope {
|
|||
crypto: Default::default(),
|
||||
timers: TimerManager::new(),
|
||||
mem_profiler_chan: init.mem_profiler_chan,
|
||||
devtools_chan: init.devtools_chan,
|
||||
devtools_sender: init.devtools_sender,
|
||||
devtools_receiver: devtools_receiver,
|
||||
to_devtools_sender: init.to_devtools_sender,
|
||||
from_devtools_sender: init.from_devtools_sender,
|
||||
from_devtools_receiver: from_devtools_receiver,
|
||||
devtools_wants_updates: Cell::new(false),
|
||||
constellation_chan: init.constellation_chan,
|
||||
}
|
||||
|
@ -124,15 +124,15 @@ impl WorkerGlobalScope {
|
|||
}
|
||||
|
||||
pub fn devtools_chan(&self) -> Option<IpcSender<ScriptToDevtoolsControlMsg>> {
|
||||
self.devtools_chan.clone()
|
||||
self.to_devtools_sender.clone()
|
||||
}
|
||||
|
||||
pub fn devtools_sender(&self) -> Option<IpcSender<DevtoolScriptControlMsg>> {
|
||||
self.devtools_sender.clone()
|
||||
pub fn from_devtools_sender(&self) -> Option<IpcSender<DevtoolScriptControlMsg>> {
|
||||
self.from_devtools_sender.clone()
|
||||
}
|
||||
|
||||
pub fn devtools_port(&self) -> &Receiver<DevtoolScriptControlMsg> {
|
||||
&self.devtools_receiver
|
||||
pub fn from_devtools_receiver(&self) -> &Receiver<DevtoolScriptControlMsg> {
|
||||
&self.from_devtools_receiver
|
||||
}
|
||||
|
||||
pub fn constellation_chan(&self) -> ConstellationChan {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue