mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
DevTools: Fix empty debugger > source
panel (#37197)
This patch fixes the source panel in the DevTools that was broken due to missing breakpoint actor implementation. The client was sending messages to the breakpoint actor that didn't exist in Servo, resulting in "unknown actor" warnings in the logs(See logs in issue description) To fix this this patch implements the `BreakpointListActor` that handles `setBreakpoint` and `setActiveEventBreakpoints` messages with empty replies. This PR does not implement `breakpoint` functionality <img width="1512" alt="image" src="https://github.com/user-attachments/assets/ac4985a6-9fd3-4854-a491-b39241e19d13" /> Fixes: https://github.com/servo/servo/issues/37196 Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
8a808f89fd
commit
568d24d4e3
3 changed files with 62 additions and 1 deletions
|
@ -19,6 +19,7 @@ use serde::Serialize;
|
|||
use serde_json::{Map, Value};
|
||||
|
||||
use self::network_parent::{NetworkParentActor, NetworkParentActorMsg};
|
||||
use super::breakpoint::BreakpointListActor;
|
||||
use super::thread::ThreadActor;
|
||||
use super::worker::WorkerMsg;
|
||||
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
|
@ -362,10 +363,14 @@ impl Actor for WatcherActor {
|
|||
ActorMessageStatus::Processed
|
||||
},
|
||||
"getBreakpointListActor" => {
|
||||
let breakpoint_list_name = registry.new_name("breakpoint-list");
|
||||
let breakpoint_list = BreakpointListActor::new(breakpoint_list_name.clone());
|
||||
registry.register_later(Box::new(breakpoint_list));
|
||||
|
||||
let _ = stream.write_json_packet(&GetBreakpointListActorReply {
|
||||
from: self.name(),
|
||||
breakpoint_list: GetBreakpointListActorReplyInner {
|
||||
actor: registry.new_name("breakpoint-list"),
|
||||
actor: breakpoint_list_name,
|
||||
},
|
||||
});
|
||||
ActorMessageStatus::Processed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue