mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +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,
|
stream: &mut TcpStream,
|
||||||
) -> Result<ActorMessageStatus, ()> {
|
) -> Result<ActorMessageStatus, ()> {
|
||||||
Ok(match msg_type {
|
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" => {
|
"getCachedMessages" => {
|
||||||
let str_types = msg
|
let str_types = msg
|
||||||
.get("messageTypes")
|
.get("messageTypes")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue