Bug 225117

Summary: IPC::decoder::decode() should mark decoder as invalid when failing
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, andersca, darin, ggaren, kkinnunen, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225110
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Chris Dumez 2021-04-27 12:52:23 PDT
IPC::decoder::decode() should mark decoder as invalid when failing, instead of relying on individual type decoders to do so.
Comment 1 Chris Dumez 2021-04-27 12:54:49 PDT
Created attachment 427183 [details]
Patch
Comment 2 Chris Dumez 2021-04-27 13:22:09 PDT
Created attachment 427186 [details]
Patch
Comment 3 Chris Dumez 2021-04-27 13:35:19 PDT
Created attachment 427189 [details]
Patch
Comment 4 Darin Adler 2021-04-27 16:09:12 PDT
Comment on attachment 427189 [details]
Patch

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

> Source/WebKit/ChangeLog:10
> +        IPC::decoder::decode() should mark decoder as invalid when failing, instead of relying
> +        on individual type decoders to do so. This makes type decoders a bit simpler and less
> +        error-prone.

Seems like the risk here is if any caller was calling an individual type decoder directly. If it was, then the markInvalid no longer happens.

Benefit is very high, I definitely approve of this idea.
Comment 5 EWS 2021-04-27 16:35:31 PDT
Committed r276678 (237095@main): <https://commits.webkit.org/237095@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427189 [details].
Comment 6 Radar WebKit Bug Importer 2021-04-27 16:36:23 PDT
<rdar://problem/77237455>