mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
fix redundant closure (#31842)
This commit is contained in:
parent
566fd475d9
commit
0a771169b8
1 changed files with 4 additions and 4 deletions
|
@ -290,7 +290,7 @@ impl WindowProxy {
|
||||||
let window = self
|
let window = self
|
||||||
.currently_active
|
.currently_active
|
||||||
.get()
|
.get()
|
||||||
.and_then(|id| ScriptThread::find_document(id))
|
.and_then(ScriptThread::find_document)
|
||||||
.and_then(|doc| Some(DomRoot::from_ref(doc.window())))
|
.and_then(|doc| Some(DomRoot::from_ref(doc.window())))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let msg = EmbedderMsg::AllowOpeningWebView(chan);
|
let msg = EmbedderMsg::AllowOpeningWebView(chan);
|
||||||
|
@ -303,7 +303,7 @@ impl WindowProxy {
|
||||||
let document = self
|
let document = self
|
||||||
.currently_active
|
.currently_active
|
||||||
.get()
|
.get()
|
||||||
.and_then(|id| ScriptThread::find_document(id))
|
.and_then(ScriptThread::find_document)
|
||||||
.expect("A WindowProxy creating an auxiliary to have an active document");
|
.expect("A WindowProxy creating an auxiliary to have an active document");
|
||||||
|
|
||||||
let blank_url = ServoUrl::parse("about:blank").ok().unwrap();
|
let blank_url = ServoUrl::parse("about:blank").ok().unwrap();
|
||||||
|
@ -500,7 +500,7 @@ impl WindowProxy {
|
||||||
let existing_document = self
|
let existing_document = self
|
||||||
.currently_active
|
.currently_active
|
||||||
.get()
|
.get()
|
||||||
.and_then(|id| ScriptThread::find_document(id))
|
.and_then(ScriptThread::find_document)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
// Step 14.1
|
// Step 14.1
|
||||||
let url = match existing_document.url().join(&url) {
|
let url = match existing_document.url().join(&url) {
|
||||||
|
@ -603,7 +603,7 @@ impl WindowProxy {
|
||||||
pub fn document(&self) -> Option<DomRoot<Document>> {
|
pub fn document(&self) -> Option<DomRoot<Document>> {
|
||||||
self.currently_active
|
self.currently_active
|
||||||
.get()
|
.get()
|
||||||
.and_then(|id| ScriptThread::find_document(id))
|
.and_then(ScriptThread::find_document)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parent(&self) -> Option<&WindowProxy> {
|
pub fn parent(&self) -> Option<&WindowProxy> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue