Bug 226189

Summary: _WKRemoteObjectRegistry should not call completion handlers if block signatures don't match or can't be found
Product: WebKit Reporter: Julian Gonzalez <julian_a_gonzalez>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, ggaren, rniwa, sam
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: macOS 11   
Attachments:
Description Flags
Patch
none
Patch none

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].