From a7c796aaf1982810751c5126cdae3373604dfc5f Mon Sep 17 00:00:00 2001 From: "Brian J. Burg" Date: Wed, 24 Oct 2012 14:27:10 -0700 Subject: [PATCH] Update servo to rust 3b6f5a1. Removes extraneous by-ref parameter to option::get(), and removes binary move operator. --- README.md | 2 +- src/rust-layers | 2 +- src/rust-mozjs | 2 +- src/servo/content/content_task.rs | 10 +++++----- src/servo/css/parser.rs | 8 ++++---- src/servo/dom/bindings/utils.rs | 2 +- src/servo/dom/cow.rs | 2 +- src/servo/layout/box_builder.rs | 2 +- src/servo/platform/osmain.rs | 7 ------- src/servo/text/text_run.rs | 2 +- 10 files changed, 16 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index fb583a7e19b..dc53704223f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ against a released version of Rust will not work, nor will the Rust 'master' branch. The commit below will *probably* work. If it does not then the topic in #servo might know better. -* Last known-good Rust commit: 754704ea9442ce92602f8022f6c979824b016842 +* Last known-good Rust commit: 3b6f5a1 [rust]: http://www.rust-lang.org diff --git a/src/rust-layers b/src/rust-layers index b178de413ad..ad15d6ac9c6 160000 --- a/src/rust-layers +++ b/src/rust-layers @@ -1 +1 @@ -Subproject commit b178de413ad288ba47160a4691cd8a32eddd359c +Subproject commit ad15d6ac9c632018da7765b4a6f2037a224f4383 diff --git a/src/rust-mozjs b/src/rust-mozjs index 00adb11b227..cdedc9a50d0 160000 --- a/src/rust-mozjs +++ b/src/rust-mozjs @@ -1 +1 @@ -Subproject commit 00adb11b227604d3de74d67f14e7b3deef87ef56 +Subproject commit cdedc9a50d0c59de945867c72f15e9694f7a73e9 diff --git a/src/servo/content/content_task.rs b/src/servo/content/content_task.rs index 143f71f75ea..5b0432f2fcb 100644 --- a/src/servo/content/content_task.rs +++ b/src/servo/content/content_task.rs @@ -208,11 +208,11 @@ impl Content { self.window = Some(@move window); self.doc_url = Some(move url); - let compartment = option::expect(&self.compartment, ~"TODO error checking"); + let compartment = option::expect(self.compartment, ~"TODO error checking"); compartment.define_functions(debug_fns); define_bindings(compartment, - option::get(&self.document), - option::get(&self.window)); + option::get(self.document), + option::get(self.window)); do vec::consume(move js_scripts) |_i, bytes| { self.cx.evaluate_script(compartment.global_obj, move bytes, ~"???", 1u); @@ -222,7 +222,7 @@ impl Content { } Timer(timerData) => { - let compartment = option::expect(&self.compartment, ~"TODO error checking"); + let compartment = option::expect(self.compartment, ~"TODO error checking"); let thisValue = if timerData.args.len() > 0 { RUST_JSVAL_TO_OBJECT(unsafe { timerData.args.shift() }) } else { @@ -245,7 +245,7 @@ impl Content { println(fmt!("Error opening %s: %s", url_to_str(copy url), msg)); } Ok(move bytes) => { - let compartment = option::expect(&self.compartment, ~"TODO error checking"); + let compartment = option::expect(self.compartment, ~"TODO error checking"); compartment.define_functions(debug_fns); self.cx.evaluate_script(compartment.global_obj, move bytes, copy url.path, 1u); } diff --git a/src/servo/css/parser.rs b/src/servo/css/parser.rs index 171b924d37c..a9b3a9ff7a5 100644 --- a/src/servo/css/parser.rs +++ b/src/servo/css/parser.rs @@ -88,14 +88,14 @@ impl TokenReader : ParserMethods { loop { let tok = self.get(); - let built_sel <- cur_sel; + let built_sel = move cur_sel; match tok { tok::Descendant => { match self.parse_element() { Some(elmt) => { let new_sel = copy elmt; - cur_sel <- ~css::Descendant(move built_sel, move new_sel) + cur_sel = ~css::Descendant(move built_sel, move new_sel) } None => { return None; } } @@ -104,7 +104,7 @@ impl TokenReader : ParserMethods { match self.parse_element() { Some(elmt) => { let new_sel = copy elmt; - cur_sel <- ~css::Child(move built_sel, move new_sel) + cur_sel = ~css::Child(move built_sel, move new_sel) } None => { return None; } } @@ -113,7 +113,7 @@ impl TokenReader : ParserMethods { match self.parse_element() { Some(elmt) => { let new_sel = copy elmt; - cur_sel <- ~css::Sibling(move built_sel, move new_sel) + cur_sel = ~css::Sibling(move built_sel, move new_sel) } None => { return None; } } diff --git a/src/servo/dom/bindings/utils.rs b/src/servo/dom/bindings/utils.rs index bfc63c2dfef..6b0953d76b0 100644 --- a/src/servo/dom/bindings/utils.rs +++ b/src/servo/dom/bindings/utils.rs @@ -72,7 +72,7 @@ unsafe fn domstring_to_jsval(cx: *JSContext, str: &DOMString) -> JSVal { pub fn get_compartment(cx: *JSContext) -> compartment { unsafe { let content = task_from_context(cx); - let compartment = option::expect(&(*content).compartment, + let compartment = option::expect((*content).compartment, ~"Should always have compartment when \ executing JS code"); assert cx == compartment.cx.ptr; diff --git a/src/servo/dom/cow.rs b/src/servo/dom/cow.rs index 8250f50290a..b90b027ea81 100644 --- a/src/servo/dom/cow.rs +++ b/src/servo/dom/cow.rs @@ -154,7 +154,7 @@ impl Scope { } unsafe fn free(t: *T) { - let _x <- *cast::reinterpret_cast::<*T,*mut T>(&t); + let _x = move *cast::reinterpret_cast::<*T,*mut T>(&t); libc::free(cast::reinterpret_cast(&t)); } diff --git a/src/servo/layout/box_builder.rs b/src/servo/layout/box_builder.rs index 77518966ba0..a916b8793fa 100644 --- a/src/servo/layout/box_builder.rs +++ b/src/servo/layout/box_builder.rs @@ -75,7 +75,7 @@ priv fn simulate_UA_display_rules(node: Node) -> CSSDisplay { } impl BoxGenerator { - pub static pure fn new(flow: @FlowContext) -> BoxGenerator { + static pub pure fn new(flow: @FlowContext) -> BoxGenerator { unsafe { debug!("Creating box generator for flow: %s", flow.debug_str()); } BoxGenerator { flow: flow, diff --git a/src/servo/platform/osmain.rs b/src/servo/platform/osmain.rs index cff84b001ad..01054a1f11a 100644 --- a/src/servo/platform/osmain.rs +++ b/src/servo/platform/osmain.rs @@ -102,14 +102,7 @@ fn mainloop(mode: Mode, po: comm::Port, dom_event_chan: pipes::SharedChan TextRun { + static pub fn new(font: @Font, text: ~str) -> TextRun { let glyph_store = GlyphStore(text.len()); let run = TextRun { text: move text,