Urlmageddon: Use refcounted urls more often.

This commit is contained in:
Emilio Cobos Álvarez 2016-11-16 11:57:39 +01:00
parent f14e7339b5
commit 913c874cb5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
161 changed files with 1044 additions and 718 deletions

View file

@ -10,7 +10,7 @@ use dom::bindings::reflector::{Reflector, reflect_dom_object};
use dom::bindings::str::{DOMString, USVString};
use dom::urlhelper::UrlHelper;
use dom::window::Window;
use url::Url;
use servo_url::ServoUrl;
#[dom_struct]
pub struct Location {
@ -32,12 +32,12 @@ impl Location {
LocationBinding::Wrap)
}
fn get_url(&self) -> Url {
fn get_url(&self) -> ServoUrl {
self.window.get_url()
}
fn set_url_component(&self, value: USVString,
setter: fn(&mut Url, USVString)) {
setter: fn(&mut ServoUrl, USVString)) {
let mut url = self.window.get_url();
setter(&mut url, value);
self.window.load_url(url, false, None);