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

Issue 159255: Fix a race condition where rapid back/forward clicks could close a tab... (Closed)

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

Description

Fix a race condition where rapid back/forward clicks could close a tab This can be triggered when you're on the new tab page, going to *two* other sites, then rapidly hitting back and forward randomly. If a cross-site transition was canceled before the original page responds with an "OK to close me" message, it will mistakenly categorize the close as not just for the RenderView (correspondong to one side of the cross-site transition) but for the entire tab. This change adds an explicit parameter on the messages indicating whether it's for interstials or for the tab so we don't have to rely on the request still being active. This also adds the "requesting process + route" in addition to the "new process + request" so we can be more clear about sending the messages to the correct place. The previous patch conbimed these in a confusing way. BUG=16246 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21531

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -111 lines) Patch
M chrome/browser/browser.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/mock_render_process_host.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/renderer_host/mock_render_process_host.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_process_host.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 1 2 1 chunk +12 lines, -15 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 2 1 chunk +18 lines, -25 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_helper.h View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_helper.cc View 1 2 2 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 6 chunks +60 lines, -26 lines 0 comments Download
M chrome/browser/tab_contents/render_view_host_manager.cc View 1 2 3 3 chunks +11 lines, -4 lines 0 comments Download
M chrome/common/render_messages.h View 3 2 chunks +71 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 2 chunks +9 lines, -8 lines 0 comments Download
M chrome/renderer/render_view.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/renderer/render_view.cc View 1 2 2 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
brettw
I spent a while trying to write a test for this. I was hoping to ...
11 years, 5 months ago (2009-07-23 14:52:00 UTC) #1
jam
lgtm
11 years, 5 months ago (2009-07-23 20:22:22 UTC) #2
darin (slow to review)
LGTM http://codereview.chromium.org/159255/diff/27/2005 File chrome/browser/renderer_host/render_process_host.h (right): http://codereview.chromium.org/159255/diff/27/2005#newcode121 Line 121: virtual void CrossSiteClosePageACK(int closing_process_id, i wonder if ...
11 years, 5 months ago (2009-07-23 20:39:49 UTC) #3
brettw
New snap up with structure usage (if you care). Currently waiting for trybots.
11 years, 5 months ago (2009-07-23 23:20:05 UTC) #4
darin (slow to review)
11 years, 5 months ago (2009-07-23 23:22:22 UTC) #5
Nice, I like how this cleans things up.

Powered by Google App Engine
This is Rietveld 408576698