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

Unified Diff: components/printing/renderer/print_web_view_helper_pdf_win.cc

Issue 2276133003: Windows: Fix an invalid handle when printing. (Closed)
Patch Set: Add TODO Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper_pdf_win.cc
diff --git a/components/printing/renderer/print_web_view_helper_pdf_win.cc b/components/printing/renderer/print_web_view_helper_pdf_win.cc
index c8ea15ca5ce987d51e29a29f7a23d3f52778a9d8..dad2aaa05a41fbac5a685b24c297b84e3427554c 100644
--- a/components/printing/renderer/print_web_view_helper_pdf_win.cc
+++ b/components/printing/renderer/print_web_view_helper_pdf_win.cc
@@ -60,10 +60,9 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebLocalFrame* frame,
printed_page_params.content_area = content_area_in_dpi[i];
Send(new PrintHostMsg_DidPrintPage(routing_id(), printed_page_params));
// Send the rest of the pages with an invalid metafile handle.
- if (printed_page_params.metafile_data_handle.IsValid()) {
- printed_page_params.metafile_data_handle.Close();
+ // TODO(erikchen): Fix semantics. See https://crbug.com/640840
+ if (printed_page_params.metafile_data_handle.IsValid())
printed_page_params.metafile_data_handle = base::SharedMemoryHandle();
- }
}
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698