Bug 144880

Summary: [iOS] Dispatch ProcessAssertionClient::assertionWillExpireImminently() to valid clients
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebKit2Assignee: Daniel Bates <dbates>
Status: NEW ---    
Severity: Normal CC: darin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: iOS 8.2   
See Also: https://bugs.webkit.org/show_bug.cgi?id=144661
Attachments:
Description Flags
Patch
none
Patch darin: review-

Description Daniel Bates 2015-05-11 11:57:02 PDT
Ensure that we only dispatch ProcessAssertionClient::assertionWillExpireImminently() to clients that have not been removed from the list of ProcessAssertionClient clients owned by WKProcessAssertionBackgroundTaskManager.
Comment 1 Daniel Bates 2015-05-11 12:01:20 PDT
Created attachment 252880 [details]
Patch
Comment 2 Daniel Bates 2015-05-11 15:58:13 PDT
Created attachment 252901 [details]
Patch

Remove inadvertently added duplicate call to ProcessAssertionClient::assertionWillExpireImminently().
Comment 3 Darin Adler 2015-05-11 17:24:46 PDT
Comment on attachment 252901 [details]
Patch

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

> Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:114
> +                if (_clients.contains(client))

This will probably work in practice but it’s incorrect. The old client object might have been deallocated and a new client object might have been defined at the same address.
Comment 4 Daniel Bates 2016-07-08 17:55:03 PDT
<rdar://problem/27219361>