r279601 added an internal WorkQueue to ProcessAssertion, so that we could acquire the RunningBoard assertion asynchronously on the background queue. When dispatching to the background queue, we capture |protectedThis|, which means that ProcessAssertion may now get destroyed on the background queue. ProcessAssertion is a main thread object and destroying it on a non-main thread can lead to crashes.
<rdar://76972252>
Created attachment 433323 [details] Patch
Created attachment 433325 [details] Patch
Comment on attachment 433325 [details] Patch r=me
Committed r279835 (239595@main): <https://commits.webkit.org/239595@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433325 [details].
Reverted r279835 for reason: Newly added assertions are wrong Committed r279840 (239599@main): <https://commits.webkit.org/239599@main>
Comment on attachment 433325 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433325&action=review > Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:324 > + ASSERT(isMainRunLoop()); WebSQLiteDatabaseTracker takes and releases assertions on a non-main thread (with a lock) so those assertions hit in debug. I am reworking the patch.
Created attachment 433338 [details] Patch
Comment on attachment 433338 [details] Patch Requesting review again because the patch has changed substantially.
Comment on attachment 433338 [details] Patch r=me
Committed r279877 (239630@main): <https://commits.webkit.org/239630@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433338 [details].
This was actually rdar://problem/80344055