New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 763808 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression: PDF page doesn't get reload after ending process from Task manager.

Reported by db...@etouch.net, Sep 11 2017

Issue description

Chrome Version: 63.0.3212.0 Revision c3a3481c4b1b08775b477144d1d2873a2a3d9900-refs/heads/master@{#500792}(32/64 bit) 
OS: Windows (7,8,10),Linux (14.04 LTS), Mac(10.11.6,10.12.3,10.12.5).

URL: https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm?hl=en

What steps will reproduce the problem?
(1) Launch chrome, navigate to above url and click on ADD TO CHROME button to add 'PDF Viewer' extension.
(2) Then navigate to any PDF page(e.g.http://che.org.il/wp-content/uploads/2016/12/pdf-sample.pdf)
(3) Now open Task manger, and kill the extension: process.
(4) Then try to reload the PDF page and observe.

Actual: PDF page doesn't get relaod after ending process from Task manger.

Expected: PDF page should get reload.

This is a regression issue, broken in 'M-62', will soon update the other info:

 
Actual_PDF.mov
8.7 MB Download
Expected_PDF.mov
4.7 MB Download

Comment 1 by db...@etouch.net, Sep 11 2017

Labels: hasbisect-per-revision
Owner: alex...@chromium.org
Status: Assigned (was: Unconfirmed)
Good Build:62.0.3201.0
Bad Build: 62.0.3202.0

You are probably looking for a change made after 498970 (known good), but no later than 498971 (first known bad).

CHANGELOG URL: 
https://chromium.googlesource.com/chromium/src/+log/76fdda166f1878ad1b8442a79945f17c288feb81..393b9789bd7930474ce268bd7c29b3e3b54ff31c

Suspect: https://chromium.googlesource.com/chromium/src/+/393b9789bd7930474ce268bd7c29b3e3b54ff31c
Labels: ReleaseBlock-Stable
Adding RB Label as this is a recent Regression. Please remove if not required.
Thank You.
Cc: rdevlin....@chromium.org rob@robwu.nl creis@chromium.org
Components: UI>Browser>Navigation
Summary: Regression: PDF page doesn't get reload after ending process from Task manger. (was: Regression: PDF page doesn't get relaod after ending process from Task manger.)
I can confirm that this is due to my r498971.  Interestingly, when reloading the PDF, I get a ERR_BLOCKED_BY_CLIENT error page with my CL.  Without my CL, I momentarily see a "file not found" message, which then changes to the PDF.  Investigating.
Status: Started (was: Assigned)
Summary: Regression: PDF page doesn't get reload after ending process from Task manager. (was: Regression: PDF page doesn't get reload after ending process from Task manger.)
OK, found the bug.  Previously, ChromeExtensionWebContentsObserver::ReloadIfTerminated looked up the extension_id using the GetExtensionId(rvh) helper, which took in a RenderViewHost and just returned its site URL's host.  After my refactor, ReloadIfTerminated looks up the extension_id with GetExtensionIdFromFrame, which I thought was equivalent, but on closer inspection, it's not.  GetExtensionIdFromFrame tries to look up the actual extension first with GetExtensionFromFrame, which uses
  const Extension* extension = ExtensionRegistry::Get(browser_context)
                                   ->enabled_extensions()
                                   .GetByID(extension_id);

and then return its ID.  But when ReloadIfTerminated is called, the lookup above fails, because the extension isn't in enabled_extensions() (it's in terminated_extensions() instead).  So we exit early and don't reload the extension.  Later, ExtensionNavigationThrottle::WillStartRequest blocks the URL load because |target_extension| is null, because that lookup also used enabled_extensions().

ReloadIfTerminated should probably look up the extension ID the way the old helper used to do it -- just return the site URL's host without trying to resolve the actual extension.  I'll put together a fix.
Components: -Internals>Plugins>PDF
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f7f91782c6a16a5b7a9ba30b5a5c21a9671b757b

commit f7f91782c6a16a5b7a9ba30b5a5c21a9671b757b
Author: Alex Moshchuk <alexmos@chromium.org>
Date: Tue Sep 12 15:53:05 2017

Ensure ReloadIfTerminated can find extension ID for a terminated extension

r498971 changed ReloadIfTerminated from looking up the extension ID
directly from the site URL's host(), to using the
GetExtensionIdFromFrame helper.  Unfortunately, the latter isn't
exactly equivalent: it returns the ID of an extension that it looks up
via active_extensions(), which fails for terminated extensions.

Instead, change GetExtensionIdFromFrame to just return the RFH's site
URL's host(), the way it used to work for ReloadIfTerminated.  Also
have GetExtensionFromFrame use this as a helper.

Bug:  763808 
Change-Id: Ibc19ff484573f764732ffe13cc5f9d5d25b13999
Reviewed-on: https://chromium-review.googlesource.com/661359
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501291}
[modify] https://crrev.com/f7f91782c6a16a5b7a9ba30b5a5c21a9671b757b/extensions/browser/extension_web_contents_observer.cc

This should be fixed by c#6.  I'll verify in tomorrow's canary and request a merge if that looks good.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4cf29ebf781b802afdb8f0bc9272849bba07e35

commit b4cf29ebf781b802afdb8f0bc9272849bba07e35
Author: Alex Moshchuk <alexmos@chromium.org>
Date: Tue Sep 12 17:00:11 2017

Re-enable a bunch of ExtensionCrashRecoveryTests

All but two of these tests appear to be now passing.

Bug:  174705 ,  242167 ,  84719 ,  241245 ,  242196 ,  241164 ,  243648 ,  169622 ,  232340 ,  763808 
Change-Id: I50732446c54a1de54b3b6a233650855e7f785742
Reviewed-on: https://chromium-review.googlesource.com/661997
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501314}
[modify] https://crrev.com/b4cf29ebf781b802afdb8f0bc9272849bba07e35/chrome/browser/extensions/extension_crash_recovery_browsertest.cc

Labels: Merge-Request-62
Verified that r501314 from #6 fixes this in 63.0.3214.0 canary.  Requesting merge for that change to M62.  This is a fairly simple, low-risk change that fixes reloading crashed extensions, inadvertently broken by r498971, which landed just before the branch cut.
Project Member

Comment 10 by sheriffbot@chromium.org, Sep 14 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-62 Merge-Approved-62
Approving merge to M62. Branch:3202
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 14 2017

Labels: -merge-approved-62 merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5105e28fe816571cffab4cc43a6e264223709138

commit 5105e28fe816571cffab4cc43a6e264223709138
Author: Alex Moshchuk <alexmos@chromium.org>
Date: Thu Sep 14 21:49:42 2017

Ensure ReloadIfTerminated can find extension ID for a terminated extension (Merge to M62)

r498971 changed ReloadIfTerminated from looking up the extension ID
directly from the site URL's host(), to using the
GetExtensionIdFromFrame helper.  Unfortunately, the latter isn't
exactly equivalent: it returns the ID of an extension that it looks up
via active_extensions(), which fails for terminated extensions.

Instead, change GetExtensionIdFromFrame to just return the RFH's site
URL's host(), the way it used to work for ReloadIfTerminated.  Also
have GetExtensionFromFrame use this as a helper.

TBR=alexmos@chromium.org

(cherry picked from commit f7f91782c6a16a5b7a9ba30b5a5c21a9671b757b)

Bug:  763808 
Change-Id: Ibc19ff484573f764732ffe13cc5f9d5d25b13999
Reviewed-on: https://chromium-review.googlesource.com/661359
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#501291}
Reviewed-on: https://chromium-review.googlesource.com/668020
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/branch-heads/3202@{#234}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/5105e28fe816571cffab4cc43a6e264223709138/extensions/browser/extension_web_contents_observer.cc

Status: Fixed (was: Started)

Comment 14 by db...@etouch.net, Sep 20 2017

Labels: TE-Verified-62.0.3202.29 TE-Verified-M62
Just to Update:

Rechecked the above issue on Mac OS with Chrome Beta version :62.0.3202.29 and the issue is not reproducible.Kindly refer the attached screen cast for reference.

Actual_Issue.mov
6.5 MB Download

Sign in to add a comment