Bug 226189 - _WKRemoteObjectRegistry should not call completion handlers if block signatures don't match or can't be found
Summary: _WKRemoteObjectRegistry should not call completion handlers if block signatur...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-24 15:11 PDT by Julian Gonzalez
Modified: 2021-05-25 18:19 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2021-05-24 15:16 PDT, Julian Gonzalez
no flags Details | Formatted Diff | Diff
Patch (2.10 KB, patch)
2021-05-24 15:51 PDT, Julian Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Gonzalez 2021-05-24 15:11:53 PDT
There is code in _WKRemoteObjectRegistry's _invokeMethod() to check reply blocks that does not fire if block signatures are incompatible (or there is no expected block signature).
In this case, we'll perform the invocation with a nil reply block (at least in Release builds), which can cause crashes.

<rdar://problem/70004926>
Comment 1 Julian Gonzalez 2021-05-24 15:16:39 PDT
Created attachment 429572 [details]
Patch
Comment 2 Julian Gonzalez 2021-05-24 15:21:07 PDT
Rebasing.
Comment 3 Julian Gonzalez 2021-05-24 15:51:16 PDT
Created attachment 429580 [details]
Patch
Comment 4 Chris Dumez 2021-05-25 17:39:54 PDT
Comment on attachment 429580 [details]
Patch

r=me
Comment 5 EWS 2021-05-25 18:19:17 PDT
Committed r278071 (238150@main): <https://commits.webkit.org/238150@main>

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