mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
refactor(script): remove {DedicatedWorkerGlobalScope, ServiceWorkerGlobalScope}::origin
This commit is contained in:
parent
90b78a193c
commit
dfb4a0c844
2 changed files with 2 additions and 10 deletions
|
@ -53,7 +53,7 @@ use net_traits::IpcSend;
|
|||
use parking_lot::Mutex;
|
||||
use script_traits::{WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
|
||||
use servo_rand::random;
|
||||
use servo_url::{MutableOrigin, ServoUrl};
|
||||
use servo_url::ServoUrl;
|
||||
use std::mem::replace;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
|
@ -307,10 +307,6 @@ impl DedicatedWorkerGlobalScope {
|
|||
unsafe { DedicatedWorkerGlobalScopeBinding::Wrap(SafeJSContext::from_ptr(cx), scope) }
|
||||
}
|
||||
|
||||
pub fn origin(&self) -> MutableOrigin {
|
||||
MutableOrigin::new(self.workerglobalscope.get_url().origin())
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
// https://html.spec.whatwg.org/multipage/#run-a-worker
|
||||
pub fn run_worker_scope(
|
||||
|
|
|
@ -43,7 +43,7 @@ use parking_lot::Mutex;
|
|||
use script_traits::{ScopeThings, ServiceWorkerMsg, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
|
||||
use servo_config::pref;
|
||||
use servo_rand::random;
|
||||
use servo_url::{MutableOrigin, ServoUrl};
|
||||
use servo_url::ServoUrl;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
use std::thread::{self, JoinHandle};
|
||||
|
@ -279,10 +279,6 @@ impl ServiceWorkerGlobalScope {
|
|||
unsafe { ServiceWorkerGlobalScopeBinding::Wrap(SafeJSContext::from_ptr(cx), scope) }
|
||||
}
|
||||
|
||||
pub fn origin(&self) -> MutableOrigin {
|
||||
MutableOrigin::new(self.scope_url.origin())
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
// https://html.spec.whatwg.org/multipage/#run-a-worker
|
||||
pub fn run_serviceworker_scope(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue