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

Issue 160249: Merge 21685 - Relanding r21673 without reenabling the BrowserTest, which appa... (Closed)

Created:
11 years, 4 months ago by laforge
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews_googlegroups.com, darin (slow to review), brettw, jam, Ben Goodger (Google)
Visibility:
Public.

Description

Merge 21685 - Relanding r21673 without reenabling the BrowserTest, which apparently is still failing. Make downloads not prevent tabs from closing. If a download creates a crosssite transition (for example, if you click a link in Gmail that results in a download in a new tab), that tab will be stuck and you can't close it or the browser. This is the opposite problem with a similar cause as bug 16246. In both cases we were using some secondary signal to tell us if we're closing for a cross site transition or closing the tab, and that signal was wrong. In this case, we were running the onunload handler, but because there was a pending RenderViewHost, the RenderManager would think that the close was a crosssite one, and not forward the close message to actually close the tab. This patch adds a flag to the on unload handlers that indicates whether it's for a tab closure or a crosssite transition, so we can do the right thing unambiguously when the message returns. In this case I keep this information in the RenderView in case we send multiple close requests, we'll close the tab if any of them were for the entire tab, even if that particular one was dropped because we don't want to have more than one in flight at once. BUG=17560 TEST=none. Review URL: http://codereview.chromium.org/160122 Review URL: http://codereview.chromium.org/159426 TBR=brettw@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21806

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -38 lines) Patch
MM chrome/browser/browser.cc View 2 chunks +2 lines, -2 lines 0 comments Download
MM chrome/browser/renderer_host/render_view_host.h View 2 chunks +14 lines, -1 line 0 comments Download
MM chrome/browser/renderer_host/render_view_host.cc View 3 chunks +20 lines, -5 lines 0 comments Download
MM chrome/browser/renderer_host/render_view_host_delegate.h View 1 chunk +5 lines, -3 lines 0 comments Download
MM chrome/browser/tab_contents/render_view_host_manager.h View 1 chunk +1 line, -1 line 0 comments Download
MM chrome/browser/tab_contents/render_view_host_manager.cc View 2 chunks +20 lines, -21 lines 0 comments Download
MM chrome/browser/tab_contents/tab_contents.h View 1 chunk +0 lines, -1 line 0 comments Download
MM chrome/browser/tab_contents/tab_contents.cc View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
laforge
11 years, 4 months ago (2009-07-28 02:48:20 UTC) #1
brettw
11 years, 4 months ago (2009-07-28 03:01:58 UTC) #2
LGTM

On Mon, Jul 27, 2009 at 7:48 PM, <laforge@chromium.org> wrote:
> Reviewers: brettw,
>
> Description:
> Merge 21685 - Relanding r21673 without reenabling the BrowserTest, which
> apparently is
> still failing.
>
> Make downloads not prevent tabs from closing. If a download creates a
> crosssite transition (for example, if you click a link in Gmail that
> results
> in a download in a new tab), that tab will be stuck and you can't close
> it or
> the browser. This is the opposite problem with a similar cause as bug
> 16246. In
> both cases we were using some secondary signal to tell us if we're
> closing for
> a cross site transition or closing the tab, and that signal was wrong.
> In this
> case, we were running the onunload handler, but because there was a
> pending
> RenderViewHost, the RenderManager would think that the close was a
> crosssite
> one, and not forward the close message to actually close the tab. This
> patch
> adds a flag to the on unload handlers that indicates whether it's for a
> tab
> closure or a crosssite transition, so we can do the right thing
> unambiguously
> when the message returns. In this case I keep this information in the
> RenderView in case we send multiple close requests, we'll close the tab
> if any
> of them were for the entire tab, even if that particular one was dropped
> because we don't want to have more than one in flight at once. BUG=3D1756=
0
> TEST=3Dnone.
> Review URL: http://codereview.chromium.org/160122
> Review URL: http://codereview.chromium.org/159426
>
> TBR=3Dbrettw@chromium.org
>
>
> Please review this at http://codereview.chromium.org/160249
>
> SVN Base: svn://chrome-svn/chrome/branches/195/src/
>
> Affected files:
> =A0MM =A0 =A0chrome/browser/browser.cc
> =A0MM =A0 =A0chrome/browser/renderer_host/render_view_host.h
> =A0MM =A0 =A0chrome/browser/renderer_host/render_view_host.cc
> =A0MM =A0 =A0chrome/browser/renderer_host/render_view_host_delegate.h
> =A0MM =A0 =A0chrome/browser/tab_contents/render_view_host_manager.h
> =A0MM =A0 =A0chrome/browser/tab_contents/render_view_host_manager.cc
> =A0MM =A0 =A0chrome/browser/tab_contents/tab_contents.h
> =A0MM =A0 =A0chrome/browser/tab_contents/tab_contents.cc
>
>
>

Powered by Google App Engine
This is Rietveld 408576698