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

Unified Diff: chrome/browser/render_view_host.cc

Issue 4262: Stop spamming delayed tasks on each input event. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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
Index: chrome/browser/render_view_host.cc
===================================================================
--- chrome/browser/render_view_host.cc (revision 2551)
+++ chrome/browser/render_view_host.cc (working copy)
@@ -233,7 +233,7 @@
// Start the hang monitor in case the renderer hangs in the beforeunload
// handler.
is_waiting_for_unload_ack_ = true;
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
Send(new ViewMsg_ShouldClose(routing_id_));
} else {
// This RenderViewHost doesn't have a live renderer, so just skip running
@@ -245,7 +245,7 @@
void RenderViewHost::FirePageUnload() {
// Start the hang monitor in case the renderer hangs in the unload handler.
is_waiting_for_unload_ack_ = true;
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
ClosePage(site_instance()->process_host_id(),
routing_id());
}
@@ -487,7 +487,7 @@
bool success,
const std::wstring& prompt) {
if (is_waiting_for_unload_ack_)
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
if (--modal_dialog_count_ == 0)
ResetEvent(modal_dialog_event_.Get());
@@ -498,7 +498,7 @@
void RenderViewHost::ModalHTMLDialogClosed(IPC::Message* reply_msg,
const std::string& json_retval) {
if (is_waiting_for_unload_ack_)
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
if (--modal_dialog_count_ == 0)
ResetEvent(modal_dialog_event_.Get());

Powered by Google App Engine
This is Rietveld 408576698