Bug 151319

Summary: A window with a hung tab waits 5s before closing
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Geoffrey Garen 2015-11-16 12:18:15 PST
A window with a hung tab waits 5s before closing
Comment 1 Geoffrey Garen 2015-11-16 13:23:43 PST
Created attachment 265607 [details]
Patch
Comment 2 Anders Carlsson 2015-11-16 15:45:41 PST
Comment on attachment 265607 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=265607&action=review

> Source/WebKit2/UIProcess/WebPageProxy.cpp:867
> +    // Close without delay if the process allows it. Our goal is to terminate
> +    // the process, so we check a per-process status bit.
> +    if (m_process->isSuddenTerminationEnabled())
> +        return true;

Don't you also want to check that the process has one page?
Comment 3 Geoffrey Garen 2015-11-16 19:32:08 PST
> > Source/WebKit2/UIProcess/WebPageProxy.cpp:867
> > +    // Close without delay if the process allows it. Our goal is to terminate
> > +    // the process, so we check a per-process status bit.
> > +    if (m_process->isSuddenTerminationEnabled())
> > +        return true;
> 
> Don't you also want to check that the process has one page?

I don't think we need to. Returning true here just means that we skip the tryClose message and go straight to close. That should be safe even if there's another page in the process. (WKWebView always does this.)

Skipping the tryClose message in a process with more than one page is a tiny optimization -- but I mostly did it because it is simpler this way.
Comment 4 Geoffrey Garen 2015-11-17 13:25:01 PST
Comment on attachment 265607 [details]
Patch

cq+
Comment 5 WebKit Commit Bot 2015-11-17 13:32:01 PST
Comment on attachment 265607 [details]
Patch

Clearing flags on attachment: 265607

Committed r192528: <http://trac.webkit.org/changeset/192528>
Comment 6 WebKit Commit Bot 2015-11-17 13:32:04 PST
All reviewed patches have been landed.  Closing bug.