Bug 213434

Summary: REGRESSION(r259219): Sleep assertion remains active if WKWebView is closed or WebContent process crashes
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, peng.liu6, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Jer Noble 2020-06-20 12:06:42 PDT
REGRESSION(r259219): Sleep assertion remains active if WKWebView is closed or WebContent process crashes
Comment 1 Jer Noble 2020-06-20 12:07:50 PDT
<rdar://problem/57541662>
Comment 2 Jer Noble 2020-06-20 12:23:31 PDT
Created attachment 402398 [details]
Patch
Comment 3 Jer Noble 2020-06-20 12:35:04 PDT
Created attachment 402399 [details]
Patch
Comment 4 Eric Carlson 2020-06-20 14:45:11 PDT
Comment on attachment 402399 [details]
Patch

Maybe check to be sure there is no sleep disabler at the beginning of each test to ensure that the one from the previous test was released?
Comment 5 Jer Noble 2020-06-20 18:09:53 PDT
(In reply to Eric Carlson from comment #4)
> Comment on attachment 402399 [details]
> Patch
> 
> Maybe check to be sure there is no sleep disabler at the beginning of each
> test to ensure that the one from the previous test was released?

Querying for Sleep Disabling (for testing purposes at least) is per WKWebView, and we create a new WKWebView for every test. So this would be a no-op, I'm afraid.
Comment 6 EWS 2020-06-20 18:13:26 PDT
Committed r263321: <https://trac.webkit.org/changeset/263321>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402399 [details].
Comment 7 Chris Dumez 2020-07-07 16:26:30 PDT
Comment on attachment 402399 [details]
Patch

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

> Source/WebKit/UIProcess/WebProcessProxy.cpp:859
> +    m_sleepDisablers.clear();

This seems redundant since processDidTerminateOrFailedToLaunch() calls shutDown().