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

Unified Diff: chrome/renderer/render_view.cc

Issue 159255: Fix a race condition where rapid back/forward clicks could close a tab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 21465)
+++ chrome/renderer/render_view.cc (working copy)
@@ -2727,8 +2727,7 @@
Send(new ViewHostMsg_ShouldClose_ACK(routing_id_, should_close));
}
-void RenderView::OnClosePage(int new_render_process_host_id,
- int new_request_id) {
+void RenderView::OnClosePage(const ViewMsg_ClosePage_Params& params) {
// TODO(creis): We'd rather use webview()->Close() here, but that currently
// sets the WebView's delegate_ to NULL, preventing any JavaScript dialogs
// in the onunload handler from appearing. For now, we're bypassing that and
@@ -2742,14 +2741,13 @@
// TODO(davemoore) this code should be removed once WillCloseFrame() gets
// called when a page is destroyed. DumpLoadHistograms() is safe to call
// multiple times for the same frame, but it will simplify things.
- if (url.SchemeIs("http") || url.SchemeIs("https"))
+ if (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme))
DumpLoadHistograms();
main_frame->ClosePage();
}
- Send(new ViewHostMsg_ClosePage_ACK(routing_id_,
- new_render_process_host_id,
- new_request_id));
+ // Just echo back the params in the ACK.
+ Send(new ViewHostMsg_ClosePage_ACK(routing_id_, params));
}
void RenderView::OnThemeChanged() {
« no previous file with comments | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698