Do not dectect unresponsive eagerly when quitting.

Fixes https://github.com/atom/atom/issues/1589.
This commit is contained in:
Cheng Zhao 2014-02-27 12:47:00 +08:00
parent b386ec40be
commit c98e16b18f

View file

@ -260,7 +260,8 @@ void NativeWindow::CloseWebContents() {
// not closed in 500ms, in this way we can quickly show the unresponsive // 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 // dialog when the window is busy executing some script withouth waiting for
// the unresponsive timeout. // the unresponsive timeout.
if (window_unresposive_closure_.IsCancelled()) { if (!Browser::Get()->is_quiting() &&
window_unresposive_closure_.IsCancelled()) {
window_unresposive_closure_.Reset( window_unresposive_closure_.Reset(
base::Bind(&NativeWindow::RendererUnresponsive, base::Bind(&NativeWindow::RendererUnresponsive,
weak_factory_.GetWeakPtr(), weak_factory_.GetWeakPtr(),