diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-24 15:57:39 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-24 15:57:39 +0000 |
commit | eb6b87abf7962a109beb197cbabf46fb6baf1028 (patch) | |
tree | 25d7b2a3f613d89154bbc8b9d8134d9e3958177e /chrome/renderer/render_view.h | |
parent | 4f48e5f82280a06f10134c34a2e4d217c3b8ce7c (diff) | |
download | chromium_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/renderer/render_view.h')
-rw-r--r-- | chrome/renderer/render_view.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index d7288e6..7aa408029b 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -56,6 +56,7 @@ class WebPluginDelegateProxy; class WebDevToolsAgentDelegate; struct ContextMenuMediaParams; struct ThumbnailScore; +struct ViewMsg_ClosePage_Params; struct ViewMsg_Navigate_Params; struct ViewMsg_UploadFile_Params; struct WebDropData; @@ -552,7 +553,7 @@ class RenderView : public RenderWidget, // Runs the onunload handler and closes the page, replying with ClosePage_ACK // (with the given RPH and request IDs, to help track the request). - void OnClosePage(int new_render_process_host_id, int new_request_id); + void OnClosePage(const ViewMsg_ClosePage_Params& params); // Notification about ui theme changes. void OnThemeChanged(); |