Commit a1ac80c6 authored by Jesse Schettler's avatar Jesse Schettler Committed by Commit Bot

printing: Call IPCProcessed() when printing a PDF

This fixes an issue where the IPC nesting level wasn't being decremented
correctly when printing a PDF.

Bug: b:140576300
Test: Print a PDF
Change-Id: I63579581f2c8a5b9afb231e6057ef8f2f7425ca7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809973Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Jesse Schettler <jschettler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697658}
parent 011e6441
......@@ -1195,8 +1195,10 @@ void PrintRenderFrameHelper::InitiatePrintPreview(
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
IPCReceived();
if (ipc_nesting_level_ > 1)
if (ipc_nesting_level_ > 1) {
IPCProcessed();
return;
}
if (print_renderer)
print_renderer_.Bind(std::move(print_renderer));
......@@ -1208,13 +1210,13 @@ void PrintRenderFrameHelper::InitiatePrintPreview(
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.IsNull()) {
PrintNode(plugin);
IPCProcessed();
return;
}
print_preview_context_.InitWithFrame(frame);
RequestPrintPreview(has_selection
? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
IPCProcessed();
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment