#[repr(C)]pub(crate) struct DebuggerGlobalScope {
global_scope: GlobalScope,
devtools_to_script_sender: IpcSender<DevtoolScriptControlMsg>,
get_possible_breakpoints_result_sender: RefCell<Option<IpcSender<Vec<RecommendedBreakpointLocation>>>>,
}
Expand description
Global scope for interacting with the devtools Debugger API.
Fields§
§global_scope: GlobalScope
§devtools_to_script_sender: IpcSender<DevtoolScriptControlMsg>
§get_possible_breakpoints_result_sender: RefCell<Option<IpcSender<Vec<RecommendedBreakpointLocation>>>>
Implementations§
Source§impl DebuggerGlobalScope
impl DebuggerGlobalScope
fn __assert_parent_type(&self)
Source§impl DebuggerGlobalScope
impl DebuggerGlobalScope
Sourcepub(crate) fn new(
debugger_pipeline_id: PipelineId,
script_to_devtools_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
devtools_to_script_sender: IpcSender<DevtoolScriptControlMsg>,
mem_profiler_chan: ProfilerChan,
time_profiler_chan: ProfilerChan,
script_to_constellation_chan: ScriptToConstellationChan,
script_to_embedder_chan: ScriptToEmbedderChan,
resource_threads: ResourceThreads,
gpu_id_hub: Arc<IdentityHub>,
can_gc: CanGc,
) -> DomRoot<Self>
pub(crate) fn new( debugger_pipeline_id: PipelineId, script_to_devtools_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>, devtools_to_script_sender: IpcSender<DevtoolScriptControlMsg>, mem_profiler_chan: ProfilerChan, time_profiler_chan: ProfilerChan, script_to_constellation_chan: ScriptToConstellationChan, script_to_embedder_chan: ScriptToEmbedderChan, resource_threads: ResourceThreads, gpu_id_hub: Arc<IdentityHub>, can_gc: CanGc, ) -> DomRoot<Self>
Create a new heap-allocated DebuggerGlobalScope
.
debugger_pipeline_id
is the pipeline id to use when creating the debugger’s GlobalScope
:
- in normal script threads, it should be set to
PipelineId::new()
, because those threads can generate pipeline ids, and they may contain debuggees from more than one pipeline - in web worker threads, it should be set to the pipeline id of the page that created the thread, because those threads can’t generate pipeline ids, and they only contain one debuggee from one pipeline
pub(crate) fn as_global_scope(&self) -> &GlobalScope
fn evaluate_js( &self, script: &str, can_gc: CanGc, ) -> Result<(), JavaScriptEvaluationError>
pub(crate) fn execute(&self, can_gc: CanGc)
pub(crate) fn fire_add_debuggee( &self, can_gc: CanGc, debuggee_global: &GlobalScope, debuggee_pipeline_id: PipelineId, debuggee_worker_id: Option<WorkerId>, )
pub(crate) fn fire_get_possible_breakpoints( &self, can_gc: CanGc, spidermonkey_id: u32, result_sender: IpcSender<Vec<RecommendedBreakpointLocation>>, )
Trait Implementations§
§impl Castable for DebuggerGlobalScope
impl Castable for DebuggerGlobalScope
Source§impl DebuggerGlobalScopeMethods<DomTypeHolder> for DebuggerGlobalScope
impl DebuggerGlobalScopeMethods<DomTypeHolder> for DebuggerGlobalScope
fn NotifyNewSource(&self, args: &NotifyNewSource)
fn GetPossibleBreakpointsResult( &self, event: &DebuggerGetPossibleBreakpointsEvent, result: Vec<RecommendedBreakpointLocation>, )
Source§impl DomObject for DebuggerGlobalScope
impl DomObject for DebuggerGlobalScope
Source§impl HasParent for DebuggerGlobalScope
impl HasParent for DebuggerGlobalScope
Source§fn as_parent(&self) -> &GlobalScope
fn as_parent(&self) -> &GlobalScope
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = GlobalScope
Source§impl IDLInterface for DebuggerGlobalScope
impl IDLInterface for DebuggerGlobalScope
Source§impl MallocSizeOf for DebuggerGlobalScope
impl MallocSizeOf for DebuggerGlobalScope
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl MutDomObject for DebuggerGlobalScope
impl MutDomObject for DebuggerGlobalScope
Source§impl PartialEq for DebuggerGlobalScope
impl PartialEq for DebuggerGlobalScope
Source§impl Traceable for DebuggerGlobalScope
impl Traceable for DebuggerGlobalScope
impl DerivedFrom<EventTarget> for DebuggerGlobalScope
impl DerivedFrom<GlobalScope> for DebuggerGlobalScope
impl Eq for DebuggerGlobalScope
Auto Trait Implementations§
impl !Freeze for DebuggerGlobalScope
impl !RefUnwindSafe for DebuggerGlobalScope
impl !Send for DebuggerGlobalScope
impl !Sync for DebuggerGlobalScope
impl Unpin for DebuggerGlobalScope
impl !UnwindSafe for DebuggerGlobalScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<D, T> DomGlobalGeneric<D> for T
impl<D, T> DomGlobalGeneric<D> for T
Source§fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
fn global_(&self, realm: InRealm<'_>) -> Root<Dom<<D as DomTypes>::GlobalScope>>where
Self: Sized,
Returns the [
GlobalScope
] of the realm that the DomObject
was created in. If this
object is a Node
, this will be different from it’s owning Document
if adopted by. For
Node
s it’s almost always better to use NodeTraits::owning_global
.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert