aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-04-16 19:58:07 -0400
committerbors-servo <release+servo@mozilla.com>2014-04-16 19:58:07 -0400
commitaafadb65f2f5e318805a03f3bc9814eb1a8a50cc (patch)
tree8d01ade5919e01795705f768b30a2e56f68735df
parenta52248f765f92d0d20e4ee6465b3a8cc5d9c0c8c (diff)
parent5cc18255373fd58242307f7d2ae9a60607a50077 (diff)
downloadservo-aafadb65f2f5e318805a03f3bc9814eb1a8a50cc.tar.gz
servo-aafadb65f2f5e318805a03f3bc9814eb1a8a50cc.zip
auto merge of #2135 : mbrubeck/servo/refcell-get, r=larsbergstrom
It's going away in the next Rust upgrade (mozilla/rust#13301). r? @larsbergstrom We'll need to do the same in rust-layers.
-rw-r--r--src/components/main/constellation.rs11
-rw-r--r--src/components/main/pipeline.rs2
-rw-r--r--src/components/script/html/hubbub_html_parser.rs4
3 files changed, 7 insertions, 10 deletions
diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs
index 8b4707a1326..2777c259ff7 100644
--- a/src/components/main/constellation.rs
+++ b/src/components/main/constellation.rs
@@ -124,7 +124,7 @@ impl FrameTreeTraversal for Rc<FrameTree> {
let mut child = children.mut_iter()
.find(|child| child.frame_tree.pipeline.id == id);
for child in child.mut_iter() {
- new_child.parent.set(child.frame_tree.parent.get());
+ new_child.parent.set(child.frame_tree.parent.borrow().clone());
return ReplacedNode(replace(&mut child.frame_tree, new_child));
}
}
@@ -549,7 +549,7 @@ impl Constellation {
source Id of LoadIframeUrlMsg does have an associated pipeline in
constellation. This should be impossible.").clone();
- let source_url = source_pipeline.url.get().clone().expect("Constellation: LoadUrlIframeMsg's
+ let source_url = source_pipeline.url.borrow().clone().expect("Constellation: LoadUrlIframeMsg's
source's Url is None. There should never be a LoadUrlIframeMsg from a pipeline
that was never given a url to load.");
@@ -720,12 +720,9 @@ impl Constellation {
let to_add = frame_change.after.clone();
// Create the next frame tree that will be given to the compositor
- // NOTE: work around borrowchk issues
- let tmp = to_add.parent.clone();
- let next_frame_tree = if tmp.get().is_some() {
+ let next_frame_tree = if to_add.parent.borrow().is_some() {
// NOTE: work around borrowchk issues
- let tmp = self.current_frame().get_ref();
- tmp.clone()
+ self.current_frame().get_ref().clone()
} else {
to_add.clone()
};
diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs
index 4c9af26edb8..2ed978360ac 100644
--- a/src/components/main/pipeline.rs
+++ b/src/components/main/pipeline.rs
@@ -202,7 +202,7 @@ impl Pipeline {
}
pub fn reload(&self) {
- self.url.get().clone().map(|url| {
+ self.url.borrow().clone().map(|url| {
self.load(url);
});
}
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index 21d285632f8..c7c4e79b165 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -252,7 +252,7 @@ pub fn parse_html(page: &Page,
resource_task: ResourceTask)
-> HtmlParserResult {
debug!("Hubbub: parsing {:?}", url);
- let next_subpage_id: SubpageId = page.next_subpage_id.get();
+ let next_subpage_id: SubpageId = *page.next_subpage_id.borrow();
// Spawn a CSS parser to receive links to CSS style sheets.
let resource_task2 = resource_task.clone();
@@ -375,7 +375,7 @@ pub fn parse_html(page: &Page,
iframe_element.get_mut().set_frame(iframe_url.clone());
// Subpage Id
- let subpage_id = next_subpage_id.get();
+ let subpage_id = *next_subpage_id.borrow();
let SubpageId(id_num) = subpage_id;
next_subpage_id.set(SubpageId(id_num + 1));