Increase unresponsive time to 2s when closing.
Fixes https://github.com/atom/atom/issues/1793.
This commit is contained in:
parent
8b41e78245
commit
01a9ac21a5
1 changed files with 2 additions and 2 deletions
|
@ -288,12 +288,12 @@ void NativeWindow::CloseWebContents() {
|
||||||
content::WebContents* web_contents(GetWebContents());
|
content::WebContents* web_contents(GetWebContents());
|
||||||
|
|
||||||
// Assume the window is not responding if it doesn't cancel the close and is
|
// Assume the window is not responding if it doesn't cancel the close and is
|
||||||
// not closed in 500ms, in this way we can quickly show the unresponsive
|
// not closed in 2000ms, 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 (!Browser::Get()->is_quiting() &&
|
if (!Browser::Get()->is_quiting() &&
|
||||||
window_unresposive_closure_.IsCancelled())
|
window_unresposive_closure_.IsCancelled())
|
||||||
ScheduleUnresponsiveEvent(500);
|
ScheduleUnresponsiveEvent(2000);
|
||||||
|
|
||||||
if (web_contents->NeedToFireBeforeUnload())
|
if (web_contents->NeedToFireBeforeUnload())
|
||||||
web_contents->GetRenderViewHost()->FirePageBeforeUnload(false);
|
web_contents->GetRenderViewHost()->FirePageBeforeUnload(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue