NOTREACHED() in ChromePrintWebViewHelperDelegate::GetPdfElement() |
|||||||||||
Issue descriptionWhat steps will reproduce the problem? (1) In a debug build, run chrome /path/to/foo.pdf (2) Before foo.pdf has a chance to load, quickly press ctrl + p Expected: PDF prints / print previews Actual: Renderer code execution hits the NOTREACHED() in ChromePrintWebViewHelperDelegate::GetPdfElement().
,
Aug 11 2016
w.r.t. comment 1 - when that happens, |inside_pdf_extension| evals to false because the URL for the |frame| is still file:///path/to/foo.pdf. This sounds familiar.
,
Aug 11 2016
This issue is blocking work on ARC print support.
,
Aug 11 2016
,
Aug 12 2016
The comment 1 issue sounds like the wrong WebContents got picked. The original bug report is the PDF plugin not getting created yet. For the original problem, if we know we are trying to print a PDF, the two ways I see of going about it are: a) Go about it similar to pp::PDF::HasUnsupportedFeature() -> PpapiHostMsg_PDF_HasUnsupportedFeature -> epperPDFHost::OnHostMsgHasUnsupportedFeature() -> PDFHostMsg_PDFHasUnsupportedFeature -> PDFWebContentsHelper::OnHasUnsupportedFeature(). In PDFWebContentsHelper, it has a WebContents* and a client, so it can trigger an event of sorts and from there... - ARC can somehow watch for this event before calling print. - Manual printing can queue the print command for PDFs until this event triggers. b) Enable HS PDFScriptingAPI for all plugins in general, not just the ones inside print preview. Then add a callback for "documentLoaded" and somehow plumb a JS callback out to C++ and then eventually out to the browser? The rest is similar to (a).
,
Aug 16 2016
I think in (a) we don't need to distinguish ARC and manual printing cases as both of them have the same issue - renderer code hits NOTREACHED() in ChromePrintWebViewHelperDelegate::GetPdfElement(). So, the solution could be to wait in GetPdfElement() until an event from PDFWebContentsHelper if it's sure that PDF is expected - the same line where it hits NOTREACHED() now.
,
Sep 27 2016
,
Oct 24 2016
,
Mar 24 2017
I have probably reproduced the same bug with the following steps. It doesn't depend on the timing though. (1) Go to chrome://print (2) Press ctrl + p (when you want) => NOTREACHED() in ChromePrintWebViewHelperDelegate::GetPdfElement().
,
May 17 2017
,
Aug 4 2017
,
Jan 26 2018
Sean, this should probably live on Chrome OS Printing team. We don't have resources to work on this bug. Feel free to re-assign to better owner, I'm setting status to "Untriaged".
,
Jan 30 2018
,
Aug 1
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by thestig@chromium.org
, Aug 11 2016