diff options
author | Connor Brewster <brewsterc@my.caspercollege.edu> | 2016-05-11 15:01:43 -0600 |
---|---|---|
committer | Connor Brewster <brewsterc@my.caspercollege.edu> | 2016-05-11 15:01:43 -0600 |
commit | e50eb2a4d6d67baae55eb67a03b67efe36b582d5 (patch) | |
tree | 220349ab030cb737de04e579c2f02ed0101a4d6f /components/script/dom/browsingcontext.rs | |
parent | 9efd214b1e2f4dc8af907bec2ca04eb93fba6eb8 (diff) | |
download | servo-e50eb2a4d6d67baae55eb67a03b67efe36b582d5.tar.gz servo-e50eb2a4d6d67baae55eb67a03b67efe36b582d5.zip |
Addressed comment
Diffstat (limited to 'components/script/dom/browsingcontext.rs')
-rw-r--r-- | components/script/dom/browsingcontext.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/browsingcontext.rs b/components/script/dom/browsingcontext.rs index 54b4c87e4e7..0576c165cc0 100644 --- a/components/script/dom/browsingcontext.rs +++ b/components/script/dom/browsingcontext.rs @@ -102,6 +102,7 @@ impl BrowsingContext { history.drain((self.active_index.get() + 1)..); history.push(SessionHistoryEntry::new(document, document.url().clone(), document.Title())); self.active_index.set(self.active_index.get() + 1); + assert_eq!(self.active_index.get(), history.len() - 1); } pub fn active_document(&self) -> Root<Document> { @@ -202,8 +203,7 @@ impl Iterator for ContextIterator { if let Some(ref context) = popped { self.stack.extend(context.children.borrow() .iter() - .cloned() - .map(|ref c| Root::from_ref(&**c))); + .map(|c| Root::from_ref(&**c))); } popped } |