Summary: | A window with a hung tab waits 5s before closing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> | ||||
Component: | New Bugs | Assignee: | 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
Geoffrey Garen
2015-11-16 12:18:15 PST
Created attachment 265607 [details]
Patch
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? > > 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 on attachment 265607 [details]
Patch
cq+
Comment on attachment 265607 [details] Patch Clearing flags on attachment: 265607 Committed r192528: <http://trac.webkit.org/changeset/192528> All reviewed patches have been landed. Closing bug. |