Struct script_traits::InitialScriptState
source · pub struct InitialScriptState {Show 27 fields
pub id: PipelineId,
pub parent_info: Option<PipelineId>,
pub browsing_context_id: BrowsingContextId,
pub top_level_browsing_context_id: TopLevelBrowsingContextId,
pub opener: Option<BrowsingContextId>,
pub inherited_secure_context: Option<bool>,
pub control_chan: IpcSender<ConstellationControlMsg>,
pub control_port: IpcReceiver<ConstellationControlMsg>,
pub script_to_constellation_chan: ScriptToConstellationChan,
pub background_hang_monitor_register: Box<dyn BackgroundHangMonitorRegister>,
pub layout_to_constellation_chan: IpcSender<LayoutMsg>,
pub scheduler_chan: IpcSender<TimerSchedulerMsg>,
pub resource_threads: ResourceThreads,
pub bluetooth_thread: IpcSender<BluetoothRequest>,
pub image_cache: Arc<dyn ImageCache>,
pub time_profiler_chan: ProfilerChan,
pub mem_profiler_chan: ProfilerChan,
pub devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
pub window_size: WindowSizeData,
pub pipeline_namespace_id: PipelineNamespaceId,
pub content_process_shutdown_chan: Sender<()>,
pub webgl_chan: Option<WebGLPipeline>,
pub webxr_registry: Registry,
pub webrender_document: DocumentId,
pub webrender_api_sender: WebrenderIpcSender,
pub layout_is_busy: Arc<AtomicBool>,
pub player_context: WindowGLContext,
}
Expand description
Data needed to construct a script thread.
NB: DO NOT add any Senders or Receivers here! pcwalton will have to rewrite your code if you do! Use IPC senders and receivers instead.
Fields§
§id: PipelineId
The ID of the pipeline with which this script thread is associated.
parent_info: Option<PipelineId>
The subpage ID of this pipeline to create in its pipeline parent.
If None
, this is the root.
browsing_context_id: BrowsingContextId
The ID of the browsing context this script is part of.
top_level_browsing_context_id: TopLevelBrowsingContextId
The ID of the top-level browsing context this script is part of.
opener: Option<BrowsingContextId>
The ID of the opener, if any.
inherited_secure_context: Option<bool>
Loading into a Secure Context
control_chan: IpcSender<ConstellationControlMsg>
A channel with which messages can be sent to us (the script thread).
control_port: IpcReceiver<ConstellationControlMsg>
A port on which messages sent by the constellation to script can be received.
script_to_constellation_chan: ScriptToConstellationChan
A channel on which messages can be sent to the constellation from script.
background_hang_monitor_register: Box<dyn BackgroundHangMonitorRegister>
A handle to register script-(and associated layout-)threads for hang monitoring.
layout_to_constellation_chan: IpcSender<LayoutMsg>
A sender for the layout thread to communicate to the constellation.
scheduler_chan: IpcSender<TimerSchedulerMsg>
A channel to schedule timer events.
resource_threads: ResourceThreads
A channel to the resource manager thread.
bluetooth_thread: IpcSender<BluetoothRequest>
A channel to the bluetooth thread.
image_cache: Arc<dyn ImageCache>
The image cache for this script thread.
time_profiler_chan: ProfilerChan
A channel to the time profiler thread.
mem_profiler_chan: ProfilerChan
A channel to the memory profiler thread.
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>
A channel to the developer tools, if applicable.
window_size: WindowSizeData
Information about the initial window size.
pipeline_namespace_id: PipelineNamespaceId
The ID of the pipeline namespace for this script thread.
content_process_shutdown_chan: Sender<()>
A ping will be sent on this channel once the script thread shuts down.
webgl_chan: Option<WebGLPipeline>
A channel to the WebGL thread used in this pipeline.
webxr_registry: Registry
The XR device registry
webrender_document: DocumentId
The Webrender document ID associated with this thread.
webrender_api_sender: WebrenderIpcSender
FIXME(victor): The Webrender API sender in this constellation’s pipeline
layout_is_busy: Arc<AtomicBool>
Flag to indicate if the layout thread is busy handling a request.
player_context: WindowGLContext
Application window’s GL Context for Media player