Remove unused recycle argument from Document::unload

This commit is contained in:
George Roman 2018-11-30 17:10:25 +02:00
parent be206f3e5f
commit 6c458b04d2
3 changed files with 4 additions and 4 deletions

View file

@ -1824,7 +1824,7 @@ impl Document {
}
// https://html.spec.whatwg.org/multipage/#unload-a-document
pub fn unload(&self, recursive_flag: bool, recycle: bool) {
pub fn unload(&self, recursive_flag: bool) {
// TODO: Step 1, increase the event loop's termination nesting level by 1.
// Step 2
self.incr_ignore_opens_during_unload_counter();
@ -1872,7 +1872,7 @@ impl Document {
for iframe in self.iter_iframes() {
// TODO: handle the case of cross origin iframes.
let document = document_from_node(&*iframe);
document.unload(true, recycle);
document.unload(true);
if !document.salvageable() {
self.salvageable.set(false);
}

View file

@ -604,7 +604,7 @@ impl WindowMethods for Window {
// Step 1, prompt to unload.
if doc.prompt_to_unload(false) {
// Step 2, unload.
doc.unload(false, false);
doc.unload(false);
// Step 3, remove from the user interface
let _ = self.send_to_embedder(EmbedderMsg::CloseBrowser);
// Step 4, discard browsing context.

View file

@ -2083,7 +2083,7 @@ impl ScriptThread {
fn handle_unload_document(&self, pipeline_id: PipelineId) {
let document = self.documents.borrow().find_document(pipeline_id);
if let Some(document) = document {
document.unload(false, false);
document.unload(false);
}
}