summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_process_host.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 15:57:39 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 15:57:39 +0000
commiteb6b87abf7962a109beb197cbabf46fb6baf1028 (patch)
tree25d7b2a3f613d89154bbc8b9d8134d9e3958177e /chrome/browser/renderer_host/render_process_host.h
parent4f48e5f82280a06f10134c34a2e4d217c3b8ce7c (diff)
downloadchromium_src-eb6b87abf7962a109beb197cbabf46fb6baf1028.zip
chromium_src-eb6b87abf7962a109beb197cbabf46fb6baf1028.tar.gz
chromium_src-eb6b87abf7962a109beb197cbabf46fb6baf1028.tar.bz2
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 Review URL: http://codereview.chromium.org/159255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_process_host.h')
-rw-r--r--chrome/browser/renderer_host/render_process_host.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/render_process_host.h b/chrome/browser/renderer_host/render_process_host.h
index 4ce3741..c091e85 100644
--- a/chrome/browser/renderer_host/render_process_host.h
+++ b/chrome/browser/renderer_host/render_process_host.h
@@ -16,6 +16,7 @@
#include "ipc/ipc_sync_channel.h"
class Profile;
+struct ViewMsg_ClosePage_Params;
// Virtual interface that represents the browser side of the browser <->
// renderer communication channel. There will generally be one
@@ -118,8 +119,8 @@ class RenderProcessHost : public IPC::Channel::Sender,
// ResourceDispatcherHost. Necessary for a cross-site request, in the case
// that the original RenderViewHost is not live and thus cannot run an
// onunload handler.
- virtual void CrossSiteClosePageACK(int new_render_process_host_id,
- int new_request_id) = 0;
+ virtual void CrossSiteClosePageACK(
+ const ViewMsg_ClosePage_Params& params) = 0;
// Called on the UI thread to wait for the next PaintRect message for the
// specified render widget. Returns true if successful, and the msg out-