Struct script::script_thread::ScriptThread

source ·
pub struct ScriptThread {
Show 69 fields last_render_opportunity_time: DomRefCell<Option<Instant>>, documents: DomRefCell<DocumentCollection>, window_proxies: DomRefCell<HashMapTracedValues<BrowsingContextId, Dom<WindowProxy>>>, incomplete_loads: DomRefCell<Vec<InProgressLoad>>, incomplete_parser_contexts: IncompleteParserContexts, image_cache: Arc<dyn ImageCache>, resource_threads: ResourceThreads, bluetooth_thread: IpcSender<BluetoothRequest>, task_queue: TaskQueue<MainThreadScriptMsg>, background_hang_monitor: Box<dyn BackgroundHangMonitor>, closing: Arc<AtomicBool>, chan: MainThreadScriptChan, dom_manipulation_task_sender: Box<dyn ScriptChan>, gamepad_task_sender: Box<dyn ScriptChan>, media_element_task_sender: Sender<MainThreadScriptMsg>, user_interaction_task_sender: Sender<MainThreadScriptMsg>, networking_task_sender: Box<dyn ScriptChan>, history_traversal_task_sender: Sender<MainThreadScriptMsg>, file_reading_task_sender: Box<dyn ScriptChan>, performance_timeline_task_sender: Box<dyn ScriptChan>, port_message_sender: Box<dyn ScriptChan>, timer_task_sender: Box<dyn ScriptChan>, remote_event_task_sender: Box<dyn ScriptChan>, rendering_task_sender: Box<dyn ScriptChan>, control_chan: IpcSender<ConstellationControlMsg>, control_port: Receiver<ConstellationControlMsg>, script_sender: IpcSender<(PipelineId, ScriptMsg)>, layout_to_constellation_chan: IpcSender<LayoutMsg>, system_font_service: Arc<SystemFontServiceProxy>, image_cache_port: Receiver<ImageCacheMsg>, image_cache_channel: Sender<ImageCacheMsg>, time_profiler_chan: ProfilerChan, mem_profiler_chan: ProfilerChan, devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>, devtools_port: Receiver<DevtoolScriptControlMsg>, devtools_sender: IpcSender<DevtoolScriptControlMsg>, js_runtime: Rc<Runtime>, topmost_mouse_over_target: MutNullableDom<Element>, closed_pipelines: DomRefCell<HashSet<PipelineId>>, scheduler_chan: IpcSender<TimerSchedulerMsg>, content_process_shutdown_chan: Sender<()>, microtask_queue: Rc<MicrotaskQueue>, mutation_observer_microtask_queued: Cell<bool>, mutation_observers: DomRefCell<Vec<Dom<MutationObserver>>>, webgl_chan: Option<WebGLPipeline>, webxr_registry: Option<Registry>, worklet_thread_pool: DomRefCell<Option<Rc<WorkletThreadPool>>>, docs_with_no_blocking_loads: DomRefCell<HashSet<Dom<Document>>>, custom_element_reaction_stack: CustomElementReactionStack, webrender_document: DocumentId, compositor_api: CrossProcessCompositorApi, profile_script_events: bool, print_pwm: bool, relayout_event: bool, prepare_for_screenshot: bool, unminify_js: bool, local_script_source: Option<String>, unminify_css: bool, userscripts_path: Option<String>, headless: bool, replace_surrogates: bool, user_agent: Cow<'static, str>, player_context: WindowGLContext, node_ids: DomRefCell<HashSet<String>>, is_user_interacting: Cell<bool>, gpu_id_hub: Arc<IdentityHub>, webgpu_port: RefCell<Option<Receiver<WebGPUMsg>>>, inherited_secure_context: Option<bool>, layout_factory: Arc<dyn LayoutFactory>,
}

Fields§

§last_render_opportunity_time: DomRefCell<Option<Instant>>§documents: DomRefCell<DocumentCollection>

The documents for pipelines managed by this thread

§window_proxies: DomRefCell<HashMapTracedValues<BrowsingContextId, Dom<WindowProxy>>>

The window proxies known by this thread TODO: this map grows, but never shrinks. Issue #15258.

§incomplete_loads: DomRefCell<Vec<InProgressLoad>>

A list of data pertaining to loads that have not yet received a network response

§incomplete_parser_contexts: IncompleteParserContexts

A vector containing parser contexts which have not yet been fully processed

§image_cache: Arc<dyn ImageCache>

Image cache for this script thread.

§resource_threads: ResourceThreads

A handle to the resource thread. This is an Arc to avoid running out of file descriptors if there are many iframes.

§bluetooth_thread: IpcSender<BluetoothRequest>

A handle to the bluetooth thread.

§task_queue: TaskQueue<MainThreadScriptMsg>

A queue of tasks to be executed in this script-thread.

§background_hang_monitor: Box<dyn BackgroundHangMonitor>

The dedicated means of communication with the background-hang-monitor for this script-thread.

§closing: Arc<AtomicBool>

A flag set to true by the BHM on exit, and checked from within the interrupt handler.

§chan: MainThreadScriptChan

A channel to hand out to script thread-based entities that need to be able to enqueue events in the event queue.

§dom_manipulation_task_sender: Box<dyn ScriptChan>§gamepad_task_sender: Box<dyn ScriptChan>§media_element_task_sender: Sender<MainThreadScriptMsg>§user_interaction_task_sender: Sender<MainThreadScriptMsg>§networking_task_sender: Box<dyn ScriptChan>§history_traversal_task_sender: Sender<MainThreadScriptMsg>§file_reading_task_sender: Box<dyn ScriptChan>§performance_timeline_task_sender: Box<dyn ScriptChan>§port_message_sender: Box<dyn ScriptChan>§timer_task_sender: Box<dyn ScriptChan>§remote_event_task_sender: Box<dyn ScriptChan>§rendering_task_sender: Box<dyn ScriptChan>§control_chan: IpcSender<ConstellationControlMsg>

A channel to hand out to threads that need to respond to a message from the script thread.

§control_port: Receiver<ConstellationControlMsg>

The port on which the constellation and layout can communicate with the script thread.

§script_sender: IpcSender<(PipelineId, ScriptMsg)>

For communicating load url messages to the constellation

§layout_to_constellation_chan: IpcSender<LayoutMsg>

A sender for layout to communicate to the constellation.

§system_font_service: Arc<SystemFontServiceProxy>

A proxy to the SystemFontService to use for accessing system font lists.

§image_cache_port: Receiver<ImageCacheMsg>

The port on which we receive messages from the image cache

§image_cache_channel: Sender<ImageCacheMsg>

The channel on which the image cache can send messages to ourself.

§time_profiler_chan: ProfilerChan

For providing contact with the time profiler.

§mem_profiler_chan: ProfilerChan

For providing contact with the memory profiler.

§devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>

For providing instructions to an optional devtools server.

§devtools_port: Receiver<DevtoolScriptControlMsg>

For receiving commands from an optional devtools server. Will be ignored if no such server exists.

§devtools_sender: IpcSender<DevtoolScriptControlMsg>§js_runtime: Rc<Runtime>

The JavaScript runtime.

§topmost_mouse_over_target: MutNullableDom<Element>

The topmost element over the mouse.

§closed_pipelines: DomRefCell<HashSet<PipelineId>>

List of pipelines that have been owned and closed by this script thread.

§scheduler_chan: IpcSender<TimerSchedulerMsg>§content_process_shutdown_chan: Sender<()>§microtask_queue: Rc<MicrotaskQueue>§mutation_observer_microtask_queued: Cell<bool>

Microtask Queue for adding support for mutation observer microtasks

§mutation_observers: DomRefCell<Vec<Dom<MutationObserver>>>

The unit of related similar-origin browsing contexts’ list of MutationObserver objects

§webgl_chan: Option<WebGLPipeline>

A handle to the WebGL thread

§webxr_registry: Option<Registry>

The WebXR device registry

§worklet_thread_pool: DomRefCell<Option<Rc<WorkletThreadPool>>>

The worklet thread pool

§docs_with_no_blocking_loads: DomRefCell<HashSet<Dom<Document>>>

A list of pipelines containing documents that finished loading all their blocking resources during a turn of the event loop.

§custom_element_reaction_stack: CustomElementReactionStack§webrender_document: DocumentId

The Webrender Document ID associated with this thread.

§compositor_api: CrossProcessCompositorApi

Cross-process access to the compositor’s API.

§profile_script_events: bool

Periodically print out on which events script threads spend their processing time.

§print_pwm: bool

Print Progressive Web Metrics to console.

§relayout_event: bool

Emits notifications when there is a relayout.

§prepare_for_screenshot: bool

True if it is safe to write to the image.

§unminify_js: bool

Unminify Javascript.

§local_script_source: Option<String>

Directory with stored unminified scripts

§unminify_css: bool

Unminify Css.

§userscripts_path: Option<String>

Where to load userscripts from, if any. An empty string will load from the resources/user-agent-js directory, and if the option isn’t passed userscripts won’t be loaded

§headless: bool

True if headless mode.

§replace_surrogates: bool

Replace unpaired surrogates in DOM strings with U+FFFD. See https://github.com/servo/servo/issues/6564

§user_agent: Cow<'static, str>

An optional string allowing the user agent to be set for testing.

§player_context: WindowGLContext

Application window’s GL Context for Media player

§node_ids: DomRefCell<HashSet<String>>

A set of all nodes ever created in this script thread

§is_user_interacting: Cell<bool>

Code is running as a consequence of a user interaction

§gpu_id_hub: Arc<IdentityHub>

Identity manager for WebGPU resources

§webgpu_port: RefCell<Option<Receiver<WebGPUMsg>>>

Receiver to receive commands from optional WebGPU server.

§inherited_secure_context: Option<bool>§layout_factory: Arc<dyn LayoutFactory>

A factory for making new layouts. This allows layout to depend on script.

Implementations§

source§

impl ScriptThread

source

pub fn runtime_handle() -> ParentRuntime

source

pub fn can_continue_running() -> bool

source

pub fn prepare_for_shutdown()

source

pub fn set_mutation_observer_microtask_queued(value: bool)

source

pub fn is_mutation_observer_microtask_queued() -> bool

source

pub fn add_mutation_observer(observer: &MutationObserver)

source

pub fn get_mutation_observers() -> Vec<Root<Dom<MutationObserver>>>

source

pub fn mark_document_with_no_blocked_loads(doc: &Document)

source

pub fn page_headers_available( id: &PipelineId, metadata: Option<Metadata>, can_gc: CanGc, ) -> Option<Root<Dom<ServoParser>>>

source

pub fn process_event(msg: CommonScriptMsg) -> bool

Process a single event as if it were the next event in the queue for this window event-loop. Returns a boolean indicating whether further events should be processed.

source

pub fn await_stable_state(task: Microtask)

source

pub fn check_load_origin(source: &LoadOrigin, target: &ImmutableOrigin) -> bool

Check that two origins are “similar enough”, for now only used to prevent cross-origin JS url evaluation.

https://github.com/whatwg/html/issues/2591

source

pub fn navigate( browsing_context: BrowsingContextId, pipeline_id: PipelineId, load_data: LoadData, history_handling: NavigationHistoryBehavior, )

source

pub fn process_attach_layout( new_layout_info: NewLayoutInfo, origin: MutableOrigin, )

source

pub fn get_top_level_for_browsing_context( sender_pipeline: PipelineId, browsing_context_id: BrowsingContextId, ) -> Option<TopLevelBrowsingContextId>

source

pub fn find_document(id: PipelineId) -> Option<Root<Dom<Document>>>

source

pub fn set_user_interacting(interacting: bool)

source

pub fn is_user_interacting() -> bool

source

pub fn get_fully_active_document_ids() -> HashSet<PipelineId>

source

pub fn find_window_proxy( id: BrowsingContextId, ) -> Option<Root<Dom<WindowProxy>>>

source

pub fn find_window_proxy_by_name( name: &DOMString, ) -> Option<Root<Dom<WindowProxy>>>

source

pub fn worklet_thread_pool() -> Rc<WorkletThreadPool>

source

fn handle_register_paint_worklet( &self, pipeline_id: PipelineId, name: Atom, properties: Vec<Atom>, painter: Box<dyn Painter>, )

source

pub fn push_new_element_queue()

source

pub fn pop_current_element_queue(can_gc: CanGc)

source

pub fn enqueue_callback_reaction( element: &Element, reaction: CallbackReaction, definition: Option<Rc<CustomElementDefinition>>, )

source

pub fn enqueue_upgrade_reaction( element: &Element, definition: Rc<CustomElementDefinition>, )

source

pub fn invoke_backup_element_queue(can_gc: CanGc)

source

pub fn save_node_id(node_id: String)

source

pub fn has_node_id(node_id: &str) -> bool

source

pub fn new( state: InitialScriptState, port: Receiver<MainThreadScriptMsg>, chan: Sender<MainThreadScriptMsg>, layout_factory: Arc<dyn LayoutFactory>, system_font_service: Arc<SystemFontServiceProxy>, user_agent: Cow<'static, str>, ) -> ScriptThread

Creates a new script thread.

source

pub fn get_cx(&self) -> JSContext

source

fn can_continue_running_inner(&self) -> bool

Check if we are closing.

source

fn prepare_for_shutdown_inner(&self)

We are closing, ensure no script can run and potentially hang.

source

pub fn start(&self, can_gc: CanGc)

Starts the script thread. After calling this method, the script thread will loop receiving messages on its port.

source

fn process_mouse_move_event( &self, document: &Document, window: &Window, point: Point2D<f32>, node_address: Option<UntrustedNodeAddress>, pressed_mouse_buttons: u16, can_gc: CanGc, )

Process a compositor mouse move event.

source

fn process_pending_compositor_events( &self, pipeline_id: PipelineId, can_gc: CanGc, )

Process compositor events as part of a “update the rendering task”.

source

pub(crate) fn update_the_rendering( &self, requested_by_compositor: bool, can_gc: CanGc, )

https://html.spec.whatwg.org/multipage/#update-the-rendering

Attempt to update the rendering and then do a microtask checkpoint if rendering was actually updated.

source

fn schedule_rendering_opportunity_if_necessary(&self)

source

fn handle_msgs(&self, can_gc: CanGc) -> bool

Handle incoming messages from other tasks and the task queue.

source

fn categorize_msg(&self, msg: &MixedMessage) -> ScriptThreadEventCategory

source

fn notify_activity_to_hang_monitor(&self, category: &ScriptThreadEventCategory)

source

fn message_to_pipeline(&self, msg: &MixedMessage) -> Option<PipelineId>

source

fn profile_event<F, R>( &self, category: ScriptThreadEventCategory, pipeline_id: Option<PipelineId>, f: F, ) -> R
where F: FnOnce() -> R,

source

fn handle_msg_from_constellation( &self, msg: ConstellationControlMsg, can_gc: CanGc, )

source

fn handle_set_scroll_states_msg( &self, pipeline_id: PipelineId, scroll_states: Vec<ScrollState>, )

source

fn handle_set_epoch_paint_time( &self, pipeline_id: PipelineId, epoch: Epoch, time: CrossProcessInstant, )

source

fn handle_msg_from_webgpu_server(&self, msg: WebGPUMsg, can_gc: CanGc)

source

fn handle_msg_from_script(&self, msg: MainThreadScriptMsg)

source

fn handle_msg_from_devtools(&self, msg: DevtoolScriptControlMsg, can_gc: CanGc)

source

fn handle_msg_from_image_cache( &self, (id, response): (PipelineId, PendingImageResponse), )

source

fn handle_webdriver_msg( &self, pipeline_id: PipelineId, msg: WebDriverScriptCommand, can_gc: CanGc, )

source

pub(crate) fn handle_resize_message( &self, id: PipelineId, size: WindowSizeData, size_type: WindowSizeType, )

Batch window resize operations into a single “update the rendering” task, or, if a load is in progress, set the window size directly.

source

fn handle_theme_change_msg(&self, theme: Theme)

Handle changes to the theme, triggering reflow if the theme actually changed.

source

fn handle_exit_fullscreen(&self, id: PipelineId, can_gc: CanGc)

source

fn handle_viewport(&self, id: PipelineId, rect: Rect<f32>)

source

fn handle_new_layout( &self, new_layout_info: NewLayoutInfo, origin: MutableOrigin, )

source

fn collect_reports(&self, reports_chan: ReportsChan)

source

fn handle_set_throttled_in_containing_iframe_msg( &self, parent_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, throttled: bool, )

Updates iframe element after a change in visibility

source

fn handle_set_throttled_msg(&self, id: PipelineId, throttled: bool)

source

fn handle_set_document_activity_msg( &self, id: PipelineId, activity: DocumentActivity, )

Handles activity change message

source

fn handle_focus_iframe_msg( &self, parent_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, can_gc: CanGc, )

source

fn handle_post_message_msg( &self, pipeline_id: PipelineId, source_pipeline_id: PipelineId, source_browsing_context: TopLevelBrowsingContextId, origin: Option<ImmutableOrigin>, source_origin: ImmutableOrigin, data: StructuredSerializedData, )

source

fn handle_stop_delaying_load_events_mode(&self, pipeline_id: PipelineId)

source

fn handle_unload_document(&self, pipeline_id: PipelineId, can_gc: CanGc)

source

fn handle_update_pipeline_id( &self, parent_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, top_level_browsing_context_id: TopLevelBrowsingContextId, new_pipeline_id: PipelineId, reason: UpdatePipelineIdReason, can_gc: CanGc, )

source

fn handle_update_history_state_msg( &self, pipeline_id: PipelineId, history_state_id: Option<HistoryStateId>, url: ServoUrl, can_gc: CanGc, )

source

fn handle_remove_history_states( &self, pipeline_id: PipelineId, history_states: Vec<HistoryStateId>, )

source

fn handle_resize_inactive_msg(&self, id: PipelineId, new_size: WindowSizeData)

Window was resized, but this script was not active, so don’t reflow yet

source

fn handle_page_headers_available( &self, id: &PipelineId, metadata: Option<Metadata>, can_gc: CanGc, ) -> Option<Root<Dom<ServoParser>>>

We have received notification that the response associated with a load has completed. Kick off the document and frame tree creation process using the result.

source

pub fn dom_manipulation_task_source( &self, pipeline_id: PipelineId, ) -> DOMManipulationTaskSource

source

pub fn gamepad_task_source(&self, pipeline_id: PipelineId) -> GamepadTaskSource

source

pub fn media_element_task_source( &self, pipeline_id: PipelineId, ) -> MediaElementTaskSource

source

pub fn performance_timeline_task_source( &self, pipeline_id: PipelineId, ) -> PerformanceTimelineTaskSource

source

pub fn history_traversal_task_source( &self, pipeline_id: PipelineId, ) -> HistoryTraversalTaskSource

source

pub fn user_interaction_task_source( &self, pipeline_id: PipelineId, ) -> UserInteractionTaskSource

source

pub fn networking_task_source( &self, pipeline_id: PipelineId, ) -> NetworkingTaskSource

source

pub fn port_message_queue(&self, pipeline_id: PipelineId) -> PortMessageQueue

source

pub fn file_reading_task_source( &self, pipeline_id: PipelineId, ) -> FileReadingTaskSource

source

pub fn remote_event_task_source( &self, pipeline_id: PipelineId, ) -> RemoteEventTaskSource

source

fn rendering_task_source(&self, pipeline_id: PipelineId) -> RenderingTaskSource

source

pub fn timer_task_source(&self, pipeline_id: PipelineId) -> TimerTaskSource

source

pub fn websocket_task_source( &self, pipeline_id: PipelineId, ) -> WebsocketTaskSource

source

fn handle_get_title_msg(&self, pipeline_id: PipelineId)

Handles a request for the window title.

source

fn handle_exit_pipeline_msg( &self, id: PipelineId, discard_bc: DiscardBrowsingContext, can_gc: CanGc, )

Handles a request to exit a pipeline and shut down layout.

source

fn handle_exit_script_thread_msg(&self, can_gc: CanGc)

Handles a request to exit the script thread and shut down layout.

source

pub fn handle_tick_all_animations_for_testing(id: PipelineId)

Handles animation tick requested during testing.

source

fn handle_web_font_loaded(&self, pipeline_id: PipelineId, _success: bool)

Handles a Web font being loaded. Does nothing if the page no longer exists.

source

fn handle_worklet_loaded(&self, pipeline_id: PipelineId)

Handles a worklet being loaded by triggering a relayout of the page. Does nothing if the page no longer exists.

source

fn handle_storage_event( &self, pipeline_id: PipelineId, storage_type: StorageType, url: ServoUrl, key: Option<String>, old_value: Option<String>, new_value: Option<String>, )

Notify a window of a storage event

source

fn handle_iframe_load_event( &self, parent_id: PipelineId, browsing_context_id: BrowsingContextId, child_id: PipelineId, can_gc: CanGc, )

Notify the containing document of a child iframe that has completed loading.

source

fn ask_constellation_for_browsing_context_info( &self, pipeline_id: PipelineId, ) -> Option<(BrowsingContextId, Option<PipelineId>)>

source

fn ask_constellation_for_top_level_info( &self, sender_pipeline: PipelineId, browsing_context_id: BrowsingContextId, ) -> Option<TopLevelBrowsingContextId>

source

fn remote_window_proxy( &self, global_to_clone: &GlobalScope, top_level_browsing_context_id: TopLevelBrowsingContextId, pipeline_id: PipelineId, opener: Option<BrowsingContextId>, ) -> Option<Root<Dom<WindowProxy>>>

source

fn local_window_proxy( &self, window: &Window, browsing_context_id: BrowsingContextId, top_level_browsing_context_id: TopLevelBrowsingContextId, parent_info: Option<PipelineId>, opener: Option<BrowsingContextId>, ) -> Root<Dom<WindowProxy>>

source

fn load( &self, metadata: Metadata, incomplete: InProgressLoad, can_gc: CanGc, ) -> Root<Dom<ServoParser>>

The entry point to document loading. Defines bindings, sets up the window and document objects, parses HTML and CSS, and kicks off initial layout.

source

fn notify_devtools( &self, title: DOMString, url: ServoUrl, (bc, p, w): (BrowsingContextId, PipelineId, Option<WorkerId>), )

source

fn handle_event(&self, pipeline_id: PipelineId, event: CompositorEvent)

Queue compositor events for later dispatching as part of a update_the_rendering task.

source

fn handle_mouse_button_event( &self, pipeline_id: PipelineId, mouse_event_type: MouseEventType, button: MouseButton, point: Point2D<f32>, node_address: Option<UntrustedNodeAddress>, point_in_node: Option<Point2D<f32>>, pressed_mouse_buttons: u16, can_gc: CanGc, )

source

fn handle_touch_event( &self, pipeline_id: PipelineId, event_type: TouchEventType, identifier: TouchId, point: Point2D<f32>, node_address: Option<UntrustedNodeAddress>, can_gc: CanGc, ) -> TouchEventResult

source

fn handle_wheel_event( &self, pipeline_id: PipelineId, wheel_delta: WheelDelta, point: Point2D<f32>, node_address: Option<UntrustedNodeAddress>, can_gc: CanGc, )

source

fn handle_navigate_iframe( &self, parent_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, load_data: LoadData, history_handling: NavigationHistoryBehavior, can_gc: CanGc, )

Handle a “navigate an iframe” message from the constellation.

source

pub fn eval_js_url( global_scope: &GlobalScope, load_data: &mut LoadData, can_gc: CanGc, )

Turn javascript: URL into JS code to eval, according to the steps in https://html.spec.whatwg.org/multipage/#javascript-protocol

source

fn pre_page_load(&self, incomplete: InProgressLoad, load_data: LoadData)

Instructs the constellation to fetch the document that will be loaded. Stores the InProgressLoad argument until a notification is received that the fetch is complete.

source

fn handle_fetch_metadata( &self, id: PipelineId, request_id: RequestId, fetch_metadata: Result<FetchMetadata, NetworkError>, )

source

fn handle_fetch_chunk( &self, pipeline_id: PipelineId, request_id: RequestId, chunk: Vec<u8>, )

source

fn handle_fetch_eof( &self, id: PipelineId, request_id: RequestId, eof: Result<ResourceFetchTiming, NetworkError>, )

source

fn start_page_load_about_blank( &self, incomplete: InProgressLoad, load_data: LoadData, )

Synchronously fetch about:blank. Stores the InProgressLoad argument until a notification is received that the fetch is complete.

source

fn page_load_about_srcdoc( &self, incomplete: InProgressLoad, load_data: LoadData, )

Synchronously parse a srcdoc document from a giving HTML string.

source

fn handle_css_error_reporting( &self, pipeline_id: PipelineId, filename: String, line: u32, column: u32, msg: String, )

source

fn handle_reload(&self, pipeline_id: PipelineId, can_gc: CanGc)

source

fn handle_paint_metric( &self, pipeline_id: PipelineId, metric_type: ProgressiveWebMetricType, metric_value: CrossProcessInstant, can_gc: CanGc, )

source

fn handle_media_session_action( &self, pipeline_id: PipelineId, action: MediaSessionActionType, can_gc: CanGc, )

source

pub fn enqueue_microtask(job: Microtask)

source

fn perform_a_microtask_checkpoint(&self, can_gc: CanGc)

Trait Implementations§

source§

impl Drop for ScriptThread

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl ScriptThreadFactory for ScriptThread

source§

fn create( state: InitialScriptState, layout_factory: Arc<dyn LayoutFactory>, system_font_service: Arc<SystemFontServiceProxy>, load_data: LoadData, user_agent: Cow<'static, str>, )

Create a ScriptThread.
source§

impl Traceable for ScriptThread

source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.

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> Filterable for T

source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
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.
source§

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

source§

type Output = T

Should always be Self
source§

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

source§

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>,

source§

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