fix: recursive printing crash (#21905)

This commit is contained in:
Shelley Vohr
2020-01-27 21:18:02 +00:00
committed by GitHub
parent 26dbd2218e
commit bf64b34475

View File

@@ -201,7 +201,7 @@ index 3d026cd11aa2c0b009812317995cd4e02161251e..2778bfd64270a2e93153f39e849316ed
printing_succeeded_ = false;
return true;
}
@@ -614,14 +627,24 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -614,14 +627,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
@@ -211,8 +211,6 @@ index 3d026cd11aa2c0b009812317995cd4e02161251e..2778bfd64270a2e93153f39e849316ed
+ cb_str = printing_cancelled_ ? "cancelled" : "failed";
+ std::move(callback_).Run(printing_succeeded_, cb_str);
+ }
+
+ TerminatePrintJob(true);
+
if (!print_job_)
return;