Bug 204950

Summary: Reduce timeout for page to handle beforeunload events when trying to close a page
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, ggaren, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 206366, 207121    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2019-12-06 09:03:15 PST
Reduce timeout for page to handle beforeunload events when trying to close a page. It may currently take up to 3 seconds to actually close a tab after the user clicks on the "X" to close it. This is because we wait for the page to fire and handle the beforeunload events and only give up after 3 seconds. I propose we reduce this timeout to something more reasonable from a user standpoint (e.g. 500ms, no more than 1 second).
Comment 1 Radar WebKit Bug Importer 2019-12-06 09:03:34 PST
<rdar://problem/57700419>
Comment 2 Chris Dumez 2019-12-06 09:08:15 PST
Created attachment 385021 [details]
Patch
Comment 3 WebKit Commit Bot 2019-12-06 15:02:18 PST
Comment on attachment 385021 [details]
Patch

Clearing flags on attachment: 385021

Committed r253224: <https://trac.webkit.org/changeset/253224>
Comment 4 WebKit Commit Bot 2019-12-06 15:02:19 PST
All reviewed patches have been landed.  Closing bug.