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

@ -2,8 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use servo_url::ServoUrl;
use std::sync::Arc;
use url::{Host, Url};
use url::Host;
use url::Origin as UrlOrigin;
/// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2).
@ -22,7 +23,7 @@ impl Origin {
}
/// Create a new origin for the given URL.
pub fn new(url: &Url) -> Origin {
pub fn new(url: &ServoUrl) -> Origin {
Origin {
inner: Arc::new(url.origin()),
}