Linux: Fix crash when closing popup after printing (issue #2422)

This commit is contained in:
Marshall Greenblatt 2018-04-12 14:35:57 -04:00
parent 4315f3b724
commit 87e33b1692

View File

@ -513,7 +513,11 @@ struct ClientPrintHandlerGtk::PrintHandler {
} }
void OnJobCompleted(GtkPrintJob* print_job, GError* error) { void OnJobCompleted(GtkPrintJob* print_job, GError* error) {
job_callback_->Continue(); // Continue() will result in a call to ClientPrintHandlerGtk::OnPrintReset
// which deletes |this|. Execute it asnychronously so the call stack has a
// chance to unwind.
CefPostTask(TID_UI, base::Bind(&CefPrintJobCallback::Continue,
job_callback_.get()));
job_callback_ = NULL; job_callback_ = NULL;
} }