Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a

This commit is contained in:
Jack Moffitt 2014-11-05 12:33:11 -07:00 committed by Glenn Watson
parent 26045d7fcb
commit d1b433a3b3
160 changed files with 1427 additions and 1162 deletions

View file

@ -32,11 +32,13 @@ struct StartedListenersReply {
}
#[deriving(Encodable)]
#[allow(dead_code)]
struct ConsoleAPIMessage {
_type: String, //FIXME: should this be __type__ instead?
}
#[deriving(Encodable)]
#[allow(dead_code)]
struct PageErrorMessage {
_type: String, //FIXME: should this be __type__ instead?
errorMessage: String,
@ -54,6 +56,7 @@ struct PageErrorMessage {
}
#[deriving(Encodable)]
#[allow(dead_code)]
struct LogMessage {
_type: String, //FIXME: should this be __type__ instead?
timeStamp: uint,
@ -61,6 +64,7 @@ struct LogMessage {
}
#[deriving(Encodable)]
#[allow(dead_code)]
enum ConsoleMessageType {
ConsoleAPIType(ConsoleAPIMessage),
PageErrorType(PageErrorMessage),
@ -115,7 +119,7 @@ impl Actor for ConsoleActor {
stream: &mut TcpStream) -> bool {
match msg_type.as_slice() {
"getCachedMessages" => {
let types = msg.find(&"messageTypes".to_string()).unwrap().as_list().unwrap();
let types = msg.get(&"messageTypes".to_string()).unwrap().as_list().unwrap();
let /*mut*/ messages = vec!();
for msg_type in types.iter() {
let msg_type = msg_type.as_string().unwrap();
@ -187,7 +191,7 @@ impl Actor for ConsoleActor {
//TODO: actually implement listener filters that support starting/stopping
let msg = StopListenersReply {
from: self.name(),
stoppedListeners: msg.find(&"listeners".to_string())
stoppedListeners: msg.get(&"listeners".to_string())
.unwrap()
.as_list()
.unwrap_or(&vec!())
@ -212,7 +216,7 @@ impl Actor for ConsoleActor {
}
"evaluateJS" => {
let input = msg.find(&"text".to_string()).unwrap().as_string().unwrap().to_string();
let input = msg.get(&"text".to_string()).unwrap().as_string().unwrap().to_string();
let (chan, port) = channel();
self.script_chan.send(EvaluateJS(self.pipeline, input.clone(), chan));

View file

@ -252,7 +252,7 @@ impl Actor for WalkerActor {
}
"children" => {
let target = msg.find(&"node".to_string()).unwrap().as_string().unwrap();
let target = msg.get(&"node".to_string()).unwrap().as_string().unwrap();
let (tx, rx) = channel();
self.script_chan.send(GetChildren(self.pipeline,
registry.actor_to_script(target.to_string()),
@ -347,6 +347,7 @@ struct GetLayoutReply {
}
#[deriving(Encodable)]
#[allow(dead_code)]
struct AutoMargins {
top: String,
bottom: String,
@ -389,14 +390,14 @@ impl Actor for PageStyleActor {
//TODO: query script for box layout properties of node (msg.node)
"getLayout" => {
let target = msg.find(&"node".to_string()).unwrap().as_string().unwrap();
let target = msg.get(&"node".to_string()).unwrap().as_string().unwrap();
let (tx, rx) = channel();
self.script_chan.send(GetLayout(self.pipeline,
registry.actor_to_script(target.to_string()),
tx));
let (width, height) = rx.recv();
let auto_margins = msg.find(&"autoMargins".to_string()).unwrap().as_boolean().unwrap();
let auto_margins = msg.get(&"autoMargins".to_string()).unwrap().as_boolean().unwrap();
//TODO: the remaining layout properties (margin, border, padding, position)
// as specified in getLayout in http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js