Do not dectect unresponsive eagerly when quitting.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 27 Feb 2014 04:47:00 +0000 (12:47 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 27 Feb 2014 04:47:00 +0000 (12:47 +0800)
Fixes https://github.com/atom/atom/issues/1589.

browser/native_window.cc

index c54e32d..3ef5bc7 100644 (file)
@@ -260,7 +260,8 @@ void NativeWindow::CloseWebContents() {
   // not closed in 500ms, 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 (window_unresposive_closure_.IsCancelled()) {
+  if (!Browser::Get()->is_quiting() &&
+      window_unresposive_closure_.IsCancelled()) {
     window_unresposive_closure_.Reset(
         base::Bind(&NativeWindow::RendererUnresponsive,
                    weak_factory_.GetWeakPtr(),