Increase the closing time limit to 5s.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 6 Apr 2014 05:14:59 +0000 (13:14 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 6 Apr 2014 05:16:14 +0000 (13:16 +0800)
Fixes https://github.com/atom/atom/issues/1838.

atom/browser/native_window.cc

index f19bdf0..0463fdd 100644 (file)
@@ -295,12 +295,12 @@ void NativeWindow::CloseWebContents() {
   content::WebContents* web_contents(GetWebContents());
 
   // Assume the window is not responding if it doesn't cancel the close and is
-  // not closed in 2000ms, in this way we can quickly show the unresponsive
+  // not closed in 5000ms, in this way we can quickly show the unresponsive
   // dialog when the window is busy executing some script withouth waiting for
   // the unresponsive timeout.
   if (!Browser::Get()->is_quiting() &&
       window_unresposive_closure_.IsCancelled())
-    ScheduleUnresponsiveEvent(2000);
+    ScheduleUnresponsiveEvent(5000);
 
   if (web_contents->NeedToFireBeforeUnload())
     web_contents->GetRenderViewHost()->FirePageBeforeUnload(false);