Bug 227318 - REGRESSION(r278970): A CATransaction commitHandler should not execute a client callback
Summary: REGRESSION(r278970): A CATransaction commitHandler should not execute a clien...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-23 14:31 PDT by Said Abou-Hallawa
Modified: 2021-09-09 00:02 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.39 KB, patch)
2021-06-23 14:55 PDT, Said Abou-Hallawa
thorton: review+
Details | Formatted Diff | Diff
Patch (2.56 KB, patch)
2021-06-23 17:07 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2021-06-23 14:31:28 PDT
Because the client callback may cause directly or indirectly another CATransaction commitHandler to be added which is prohibited by CA.
Comment 1 Said Abou-Hallawa 2021-06-23 14:49:48 PDT
<rdar://79625962>
Comment 2 Said Abou-Hallawa 2021-06-23 14:55:29 PDT
Created attachment 432093 [details]
Patch
Comment 3 Tim Horton 2021-06-23 16:05:44 PDT
Comment on attachment 432093 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1248
> +            dispatch_async(dispatch_get_main_queue(), ^{

Likely better to use a lambda, like we do for addCommitHandler; replace the `^{` with `[callSnapshotRect = WTFMove(callSnapshotRect)] {`
Comment 4 Said Abou-Hallawa 2021-06-23 17:07:49 PDT
Created attachment 432115 [details]
Patch
Comment 5 EWS 2021-06-23 22:27:39 PDT
Committed r279210 (239096@main): <https://commits.webkit.org/239096@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432115 [details].