diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-03-23 20:04:58 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-03-24 00:15:27 +0100 |
commit | b40992611171d4db4e0ce1188315637c6eabfff3 (patch) | |
tree | 6abb0dc23e06f32bc9263b009f01518b21990c66 /components/devtools/actors/root.rs | |
parent | 327f1c1eb8a31f1e595d1996b1a8153701ebfa2f (diff) | |
download | servo-b40992611171d4db4e0ce1188315637c6eabfff3.tar.gz servo-b40992611171d4db4e0ce1188315637c6eabfff3.zip |
Properly return an empty list in devtools' listAddons
Diffstat (limited to 'components/devtools/actors/root.rs')
-rw-r--r-- | components/devtools/actors/root.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/components/devtools/actors/root.rs b/components/devtools/actors/root.rs index 0a589db3466..b9e6fee98c9 100644 --- a/components/devtools/actors/root.rs +++ b/components/devtools/actors/root.rs @@ -21,13 +21,15 @@ 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, selected: u32, @@ -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 |