PrintPreviewUI calling non-existent Javascript function |
||
Issue descriptionChrome Version: 61.0.3150.0 (Developer Build) (64-bit) OS: Win10, but probably applies to all What steps will reproduce the problem? (1) Ensure default printer is some local (non PDF) printer. (2) Print preview some large document (13+ pages with lots of graphics worked on a debug build) (3) As soon as dialog appears (but before preview is loaded), press enter to print. (4) After several seconds (wait for print request to send), close the tab while leaving the browser open What is the expected result? No errors What happens instead? Console error - "Uncaught ReferenceError: cancelPendingPrintRequest is not defined" Appears to originate from CallJavascriptFunctionUnsafe here: https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/print_preview/print_preview_ui.cc?l=540 The Javascript function does not actually exist, and seems to have been removed many years ago in this CL: https://chromium.googlesource.com/chromium/src/+/4e2fbb6c9dd4f2c227309c975ce055b62ec818eb
,
Jul 7 2017
Apparently there is also an issue with a render process host hanging around in this case, as when the browser is closed we hit a DCHECK in profile_destroyer: FATAL:profile_destroyer.cc(56)] Check failed: hosts.empty() || profile->IsOffTheRecord() || content::RenderProcessHost::run_renderer_in_process(). Profile still has 1 hosts Also, the intended behavior (i.e. result of calling HandleCancelPendingPrintRequest) seems to be to bring up a dialog that says: "Print Failed: Something went wrong when trying to print. Please check your printer and try again." Should decide if this behavior makes sense or not. It is probably unexpected if the user has hit print and watched the dialog disappear and then closes the tab ~30 seconds later while the browser is still open. Note that calling HandleCancelPendingPrintRequest instead of CallJavascriptFunctionUnsafe(...) still has the issue with profile_destroyer, so things are not getting cleaned up correctly even when the bad JS call is removed.
,
Jul 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a9e19eb6164aaa02e60c685a97fe4c579d0d03cb commit a9e19eb6164aaa02e60c685a97fe4c579d0d03cb Author: rbpotter <rbpotter@chromium.org> Date: Wed Jul 12 16:09:54 2017 Remove bad CallJavascriptFunctionUnsafe call from PrintPreviewUI "cancelPendingPrintRequest" does not actually exist. Remove the call to this function from the PrintPreviewUI. BUG= 740264 Review-Url: https://codereview.chromium.org/2974183002 Cr-Commit-Position: refs/heads/master@{#485982} [modify] https://crrev.com/a9e19eb6164aaa02e60c685a97fe4c579d0d03cb/chrome/browser/printing/background_printing_manager.cc [modify] https://crrev.com/a9e19eb6164aaa02e60c685a97fe4c579d0d03cb/chrome/browser/printing/background_printing_manager.h [modify] https://crrev.com/a9e19eb6164aaa02e60c685a97fe4c579d0d03cb/chrome/browser/ui/webui/print_preview/print_preview_handler.cc [modify] https://crrev.com/a9e19eb6164aaa02e60c685a97fe4c579d0d03cb/chrome/browser/ui/webui/print_preview/print_preview_handler.h [modify] https://crrev.com/a9e19eb6164aaa02e60c685a97fe4c579d0d03cb/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
,
Jul 12 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by dpa...@chromium.org
, Jul 7 2017