mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Properly return an empty list in devtools' listAddons
This commit is contained in:
parent
327f1c1eb8
commit
b409926111
1 changed files with 7 additions and 6 deletions
|
@ -21,12 +21,14 @@ struct ActorTraits {
|
|||
}
|
||||
|
||||
#[derive(RustcEncodable)]
|
||||
struct ErrorReply {
|
||||
struct ListAddonsReply {
|
||||
from: String,
|
||||
error: String,
|
||||
message: String,
|
||||
addons: Vec<AddonMsg>,
|
||||
}
|
||||
|
||||
#[derive(RustcEncodable)]
|
||||
enum AddonMsg {}
|
||||
|
||||
#[derive(RustcEncodable)]
|
||||
struct ListTabsReply {
|
||||
from: String,
|
||||
|
@ -57,10 +59,9 @@ impl Actor for RootActor {
|
|||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"listAddons" => {
|
||||
let actor = ErrorReply {
|
||||
let actor = ListAddonsReply {
|
||||
from: "root".to_owned(),
|
||||
error: "noAddons".to_owned(),
|
||||
message: "This root actor has no browser addons.".to_owned(),
|
||||
addons: vec![],
|
||||
};
|
||||
stream.write_json_packet(&actor);
|
||||
ActorMessageStatus::Processed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue