Bug 144880 - [iOS] Dispatch ProcessAssertionClient::assertionWillExpireImminently() to valid clients
Summary: [iOS] Dispatch ProcessAssertionClient::assertionWillExpireImminently() to val...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad iOS 8.2
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-11 11:57 PDT by Daniel Bates
Modified: 2016-07-08 17:55 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.18 KB, patch)
2015-05-11 12:01 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (2.06 KB, patch)
2015-05-11 15:58 PDT, Daniel Bates
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>