mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Urlmageddon: Use refcounted urls more often.
This commit is contained in:
parent
f14e7339b5
commit
913c874cb5
161 changed files with 1044 additions and 718 deletions
|
@ -9,24 +9,24 @@ use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
|||
use dom::bindings::str::{DOMString, USVString};
|
||||
use dom::urlhelper::UrlHelper;
|
||||
use dom::workerglobalscope::WorkerGlobalScope;
|
||||
use url::Url;
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#worker-locations
|
||||
#[dom_struct]
|
||||
pub struct WorkerLocation {
|
||||
reflector_: Reflector,
|
||||
url: Url,
|
||||
url: ServoUrl,
|
||||
}
|
||||
|
||||
impl WorkerLocation {
|
||||
fn new_inherited(url: Url) -> WorkerLocation {
|
||||
fn new_inherited(url: ServoUrl) -> WorkerLocation {
|
||||
WorkerLocation {
|
||||
reflector_: Reflector::new(),
|
||||
url: url,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &WorkerGlobalScope, url: Url) -> Root<WorkerLocation> {
|
||||
pub fn new(global: &WorkerGlobalScope, url: ServoUrl) -> Root<WorkerLocation> {
|
||||
reflect_dom_object(box WorkerLocation::new_inherited(url),
|
||||
global,
|
||||
WorkerLocationBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue