Struct DebuggerGlobalScope

Source
#[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.

https://firefox-source-docs.mozilla.org/js/Debugger/

Fields§

§global_scope: GlobalScope§devtools_to_script_sender: IpcSender<DevtoolScriptControlMsg>§get_possible_breakpoints_result_sender: RefCell<Option<IpcSender<Vec<RecommendedBreakpointLocation>>>>

Implementations§

Source§

impl DebuggerGlobalScope

Source§

impl DebuggerGlobalScope

Source

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
Source

pub(crate) fn get_cx() -> JSContext

Get the JS context.

Source

pub(crate) fn as_global_scope(&self) -> &GlobalScope

Source

fn evaluate_js( &self, script: &str, can_gc: CanGc, ) -> Result<(), JavaScriptEvaluationError>

Source

pub(crate) fn execute(&self, can_gc: CanGc)

Source

pub(crate) fn fire_add_debuggee( &self, can_gc: CanGc, debuggee_global: &GlobalScope, debuggee_pipeline_id: PipelineId, debuggee_worker_id: Option<WorkerId>, )

Source

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

Source§

fn is<T>(&self) -> bool
where T: DerivedFrom<Self>,

Check whether a DOM object implements one of its deriving interfaces.
Source§

fn upcast<T>(&self) -> &T
where T: Castable, Self: DerivedFrom<T>,

Cast a DOM object upwards to one of the interfaces it derives from.
Source§

fn downcast<T>(&self) -> Option<&T>
where T: DerivedFrom<Self>,

Cast a DOM object downwards to one of the interfaces it might implement.
Source§

impl DebuggerGlobalScopeMethods<DomTypeHolder> for DebuggerGlobalScope

Source§

impl DomObject for DebuggerGlobalScope

Source§

fn reflector(&self) -> &Reflector

Returns the receiver’s reflector.
Source§

impl HasParent for DebuggerGlobalScope

Source§

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

Source§

type Parent = GlobalScope

Source§

impl IDLInterface for DebuggerGlobalScope

Source§

fn derives(class: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.
Source§

impl MallocSizeOf for DebuggerGlobalScope

Source§

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

Source§

unsafe fn init_reflector(&self, obj: *mut JSObject)

Initializes the Reflector Read more
Source§

impl PartialEq for DebuggerGlobalScope

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToJSValConvertible for DebuggerGlobalScope

Source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

Convert self to a JSVal. JSAPI failure causes a panic.
Source§

impl Traceable for DebuggerGlobalScope

Source§

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

Trace self.
§

impl DerivedFrom<EventTarget> for DebuggerGlobalScope

§

impl DerivedFrom<GlobalScope> for DebuggerGlobalScope

Source§

impl Eq for DebuggerGlobalScope

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

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<D, T> DomGlobalGeneric<D> for T
where D: DomTypes, T: DomObject,

Source§

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 Nodes it’s almost always better to use NodeTraits::owning_global.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> SafeToJSValConvertible for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ThisReflector for T
where T: DomObject,

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