Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4591)

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 7577001: Print Preview: Fix crash in PrepareFrameAndViewForPrint. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper.cc
===================================================================
--- chrome/renderer/print_web_view_helper.cc (revision 95179)
+++ chrome/renderer/print_web_view_helper.cc (working copy)
@@ -507,7 +507,7 @@
store_print_pages_params = false;
int cookie = print_pages_params_->params.document_cookie;
Send(new PrintHostMsg_PrintPreviewFailed(routing_id(), cookie));
- print_preview_context_.Abort();
+ print_preview_context_.Failed();
} else if (result == ABORT_PREVIEW) {
DCHECK(is_preview_);
store_print_pages_params = false;
@@ -1054,6 +1054,12 @@
ClearContext();
}
+void PrintWebViewHelper::PrintPreviewContext::Failed() {
+ DCHECK(IsBusy());
+ state_ = INITIALIZED;
+ ClearContext();
+}
+
void PrintWebViewHelper::PrintPreviewContext::Abort() {
state_ = UNINITIALIZED;
ClearContext();
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698