Auto merge of #22332 - georgeroman:remove_unused_recycle_argument, r=jdm

Remove unused recycle argument from Document::unload

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22328

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22332)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-11-30 19:55:23 -05:00 committed by GitHub
commit 160f1137fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}
}