mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Support clearing cached events in console actor.
This commit is contained in:
parent
7c48644cad
commit
bce4ec5b70
1 changed files with 7 additions and 0 deletions
|
@ -277,6 +277,13 @@ impl Actor for ConsoleActor {
|
|||
stream: &mut TcpStream,
|
||||
) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"clearMessagesCache" => {
|
||||
let browsing_context =
|
||||
registry.find::<BrowsingContextActor>(&self.browsing_context);
|
||||
self.cached_events.borrow_mut().remove(&browsing_context.active_pipeline.get());
|
||||
ActorMessageStatus::Processed
|
||||
}
|
||||
|
||||
"getCachedMessages" => {
|
||||
let str_types = msg
|
||||
.get("messageTypes")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue