Bug 160140 - [iOS] Make sure we call the ProcessAssertion invalidation handler on the main thread
Summary: [iOS] Make sure we call the ProcessAssertion invalidation handler on the main...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad Unspecified
: P1 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-07-23 20:13 PDT by Chris Dumez
Modified: 2016-07-25 09:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.60 KB, patch)
2016-07-23 20:32 PDT, Chris Dumez
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-23 20:13:47 PDT
Make sure we call the ProcessAssertion invalidation handler on the main thread. BKSProcessAssertion calls our invalidation handler on a background thread which leads to thread safety problems and crashes.
Comment 1 Chris Dumez 2016-07-23 20:14:04 PDT
<rdar://problem/27399998>
Comment 2 Chris Dumez 2016-07-23 20:32:52 PDT
Created attachment 284433 [details]
Patch
Comment 3 Darin Adler 2016-07-25 09:53:51 PDT
Comment on attachment 284433 [details]
Patch

Still need to update the iOS simulator half of ProcessAssertionIOS.mm to use WTF::Function instead of std::function.
Comment 4 Chris Dumez 2016-07-25 09:58:35 PDT
Committed r203687: <http://trac.webkit.org/changeset/203687>