Address other cleanups

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2025-08-05 10:20:22 +08:00
parent 11d5a2ef51
commit baf6424656
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ impl DebuggerEvent {
impl DebuggerEventMethods<crate::DomTypeHolder> for DebuggerEvent { impl DebuggerEventMethods<crate::DomTypeHolder> for DebuggerEvent {
// check-tidy: no specs after this line // check-tidy: no specs after this line
fn Global(&self, r#cx: script_bindings::script_runtime::JSContext) -> NonNull<JSObject> { fn Global(&self, cx: script_bindings::script_runtime::JSContext) -> NonNull<JSObject> {
// Convert the debuggee globals reflector to a Value, wrapping it from its originating realm (debuggee realm) // Convert the debuggee globals reflector to a Value, wrapping it from its originating realm (debuggee realm)
// into the active realm (debugger realm) so that it can be passed across compartments. // into the active realm (debugger realm) so that it can be passed across compartments.
rooted!(in(*cx) let mut result: Value); rooted!(in(*cx) let mut result: Value);

View file

@ -124,9 +124,9 @@ impl DebuggerGlobalScope {
#[allow(unsafe_code)] #[allow(unsafe_code)]
pub(crate) fn fire_add_debuggee(&self, can_gc: CanGc, global: &GlobalScope) { pub(crate) fn fire_add_debuggee(&self, can_gc: CanGc, global: &GlobalScope) {
let event = DomRoot::upcast::<Event>(DebuggerEvent::new(self.upcast(), global, can_gc));
assert_eq!( assert_eq!(
event.fire(self.upcast(), can_gc), DomRoot::upcast::<Event>(DebuggerEvent::new(self.upcast(), global, can_gc))
.fire(self.upcast(), can_gc),
EventStatus::NotCanceled, EventStatus::NotCanceled,
"Guaranteed by DebuggerEvent::new" "Guaranteed by DebuggerEvent::new"
); );