Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using deprecated RefCell<T>::get #2135

Merged
merged 1 commit into from Apr 17, 2014
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Stop using deprecated RefCell<T>::get

It's going away in the next Rust upgrade.
  • Loading branch information
mbrubeck committed Apr 16, 2014
commit 5cc18255373fd58242307f7d2ae9a60607a50077
@@ -123,7 +123,7 @@ impl 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));
}
}
@@ -556,7 +556,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.");

@@ -727,12 +727,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()
};
@@ -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);
});
}
@@ -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));

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.