Skip to content

Commit

Permalink
Fix devtools timeout with Firefox 133 (servo#34602)
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Oster <[email protected]>
  • Loading branch information
parasyte authored Dec 12, 2024
1 parent f7e2ec3 commit 53612da
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion components/devtools/actors/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ struct GetProcessResponse {
process_descriptor: ProcessActorMsg,
}

#[derive(Serialize)]
struct ErrorResponse {
from: String,
error: String,
message: String,
}

pub struct RootActor {
pub tabs: Vec<String>,
pub workers: Vec<String>,
Expand Down Expand Up @@ -249,7 +256,19 @@ impl Actor for RootActor {
ActorMessageStatus::Processed
},

_ => ActorMessageStatus::Ignored,
_ => {
let reply = ErrorResponse {
from: self.name(),
error: "unrecognizedPacketType".to_owned(),
message: format!(
"Actor {} does not recognize the packet type '{}'",
self.name(),
msg_type,
),
};
let _ = stream.write_json_packet(&reply);
ActorMessageStatus::Ignored
},
})
}
}
Expand Down

0 comments on commit 53612da

Please sign in to comment.