Struct script_traits::InitialScriptState

source ·
pub struct InitialScriptState {
Show 26 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: Option<Registry>, pub webrender_document: DocumentId, pub compositor_api: CrossProcessCompositorApi, 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 layout 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: Option<Registry>

The XR device registry

§webrender_document: DocumentId

The Webrender document ID associated with this thread.

§compositor_api: CrossProcessCompositorApi

Access to the compositor across a process boundary.

§player_context: WindowGLContext

Application window’s GL Context for Media player

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T

source§

impl<T> WasmNotSend for T
where T: Send,