Bug 225117 - IPC::decoder::decode() should mark decoder as invalid when failing
Summary: IPC::decoder::decode() should mark decoder as invalid when failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-27 12:52 PDT by Chris Dumez
Modified: 2021-04-27 16:36 PDT (History)
7 users (show)

See Also:


Attachments
Patch (18.42 KB, patch)
2021-04-27 12:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (31.22 KB, patch)
2021-04-27 13:22 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (32.61 KB, patch)
2021-04-27 13:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>