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

Unified Diff: chrome/browser/printing/print_view_manager.cc

Issue 2775133002: M57: Properly clean up in PrintViewManager::RenderFrameCreated(). (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | chrome/browser/printing/print_view_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_view_manager.cc
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index ea49f9b888e4f33ba9966739c1c0e1585eada2b8..bfce3a7c57f38c9aa5ec1f2a6bd6f3c974f99d3c 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -135,7 +135,8 @@ void PrintViewManager::PrintPreviewForWebNode(content::RenderFrameHost* rfh) {
void PrintViewManager::PrintPreviewDone() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- DCHECK_NE(NOT_PREVIEWING, print_preview_state_);
+ if (print_preview_state_ == NOT_PREVIEWING)
+ return;
if (print_preview_state_ == SCRIPTED_PREVIEW) {
auto& map = g_scripted_print_preview_closure_map.Get();
@@ -160,7 +161,7 @@ void PrintViewManager::RenderFrameCreated(
void PrintViewManager::RenderFrameDeleted(
content::RenderFrameHost* render_frame_host) {
if (render_frame_host == print_preview_rfh_)
- print_preview_state_ = NOT_PREVIEWING;
+ PrintPreviewDone();
PrintViewManagerBase::RenderFrameDeleted(render_frame_host);
}
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698