mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Simplify GlobalRef::resource_threads
This commit is contained in:
parent
e2dfcb658b
commit
1aebe9fde6
1 changed files with 1 additions and 6 deletions
|
@ -125,12 +125,7 @@ impl<'a> GlobalRef<'a> {
|
|||
/// Get the `ResourceThreads` for this global scope.
|
||||
pub fn resource_threads(&self) -> ResourceThreads {
|
||||
match *self {
|
||||
GlobalRef::Window(ref window) => {
|
||||
let doc = window.Document();
|
||||
let doc = doc.r();
|
||||
let loader = doc.loader();
|
||||
loader.resource_threads().clone()
|
||||
}
|
||||
GlobalRef::Window(ref window) => window.resource_threads().clone(),
|
||||
GlobalRef::Worker(ref worker) => worker.resource_threads().clone(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue