Chromium Code Reviews| Index: chrome/renderer/print_web_view_helper.cc |
| diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc |
| index ef8e5d51472dfcaa29e60762b68c52e372cd88bc..d587d4dd10b0ea0421f2968dd732e9e229dd731a 100644 |
| --- a/chrome/renderer/print_web_view_helper.cc |
| +++ b/chrome/renderer/print_web_view_helper.cc |
| @@ -200,7 +200,7 @@ void PrintWebViewHelper::OnPrintForPrintPreview( |
| // chrome/browser/resources/print_preview.js |
| WebElement pdf_element = document.getElementById("pdf-viewer"); |
| if (pdf_element.isNull()) { |
| - NOTREACHED(); |
| + DidFinishPrinting(FAIL_PRINT); |
|
Lei Zhang
2011/06/09 09:54:55
Can you explain how we reach this state? It seems
kmadhusu
2011/06/09 18:11:44
While testing I came across a test case which sati
|
| return; |
| } |
| @@ -361,7 +361,7 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { |
| web_view->mainFrame(), |
| l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT)); |
| - if (notify_browser_of_print_failure_) { |
| + if (notify_browser_of_print_failure_ && print_pages_params_.get()) { |
| int cookie = print_pages_params_->params.document_cookie; |
| Send(new PrintHostMsg_PrintingFailed(routing_id(), cookie)); |
| } |