mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
CanGc fixes from constantsourcenode.rs & window.rs (#33931)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
c75f6627ba
commit
4d11b2dc84
15 changed files with 216 additions and 156 deletions
|
@ -313,11 +313,11 @@ impl HistoryMethods for History {
|
|||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-history-go>
|
||||
fn Go(&self, delta: i32) -> ErrorResult {
|
||||
fn Go(&self, delta: i32, can_gc: CanGc) -> ErrorResult {
|
||||
let direction = match delta.cmp(&0) {
|
||||
Ordering::Greater => TraversalDirection::Forward(delta as usize),
|
||||
Ordering::Less => TraversalDirection::Back(-delta as usize),
|
||||
Ordering::Equal => return self.window.Location().Reload(),
|
||||
Ordering::Equal => return self.window.Location().Reload(can_gc),
|
||||
};
|
||||
|
||||
self.traverse_history(direction)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue