Bug 214618 - [IPC hardening] WebKit::ObjCObjectGraph::decode() and encode() should use enum ObjCType type
Summary: [IPC hardening] WebKit::ObjCObjectGraph::decode() and encode() should use enu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-21 15:53 PDT by David Kilzer (:ddkilzer)
Modified: 2020-07-22 16:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (9.96 KB, patch)
2020-07-21 16:39 PDT, David Kilzer (:ddkilzer)
youennf: review+
Details | Formatted Diff | Diff
Patch for landing (9.95 KB, patch)
2020-07-22 09:04 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2020-07-21 15:53:11 PDT
WebKit::ObjCObjectGraph::decode() and encode() should use enum ObjCType type.

We can also get rid of default: case labels while we're here to make -Wimplicit-fallthrough emit a warning when a new enum is added.

<rdar://problem/65777899>
Comment 1 David Kilzer (:ddkilzer) 2020-07-21 16:39:13 PDT
Created attachment 404875 [details]
Patch v1
Comment 2 youenn fablet 2020-07-21 23:46:42 PDT
Comment on attachment 404875 [details]
Patch v1

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

> Source/WebKit/Shared/mac/ObjCObjectGraph.mm:178
> +    }

No need for { }.
Ditto below.

> Source/WebKit/Shared/mac/ObjCObjectGraph.mm:252
> +    }

Ditto here.
Comment 3 David Kilzer (:ddkilzer) 2020-07-22 09:02:34 PDT
Comment on attachment 404875 [details]
Patch v1

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

>> Source/WebKit/Shared/mac/ObjCObjectGraph.mm:178
>> +    }
> 
> No need for { }.
> Ditto below.

Removing these.

>> Source/WebKit/Shared/mac/ObjCObjectGraph.mm:252
>> +    }
> 
> Ditto here.

Keeping these since there are two lines of code.

Thanks!
Comment 4 David Kilzer (:ddkilzer) 2020-07-22 09:04:43 PDT
Created attachment 404926 [details]
Patch for landing
Comment 5 EWS 2020-07-22 09:28:22 PDT
Committed r264701: <https://trac.webkit.org/changeset/264701>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404926 [details].
Comment 6 David Kilzer (:ddkilzer) 2020-07-22 12:33:38 PDT
(In reply to EWS from comment #5)
> Committed r264701: <https://trac.webkit.org/changeset/264701>
> 
> All reviewed patches have been landed. Closing bug and clearing flags on
> attachment 404926 [details].

Minor follow-up fix:

Committed r264720: <https://trac.webkit.org/changeset/264720>
Comment 7 David Kilzer (:ddkilzer) 2020-07-22 16:39:58 PDT
(In reply to David Kilzer (:ddkilzer) from comment #6)
> (In reply to EWS from comment #5)
> > Committed r264701: <https://trac.webkit.org/changeset/264701>
> > 
> > All reviewed patches have been landed. Closing bug and clearing flags on
> > attachment 404926 [details].
> 
> Minor follow-up fix:
> 
> Committed r264720: <https://trac.webkit.org/changeset/264720>

Second minor follow-up improvement:

Committed r264732: <https://trac.webkit.org/changeset/264732>