Bug 224221 - Shrink some IndexedDB-related classes
Summary: Shrink some IndexedDB-related classes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-05 21:00 PDT by Simon Fraser (smfr)
Modified: 2021-04-06 14:55 PDT (History)
9 users (show)

See Also:


Attachments
Patch (18.94 KB, patch)
2021-04-05 21:02 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2021-04-05 21:00:25 PDT
Shrink some IndexedDB-related classes
Comment 1 Simon Fraser (smfr) 2021-04-05 21:02:44 PDT
Created attachment 425237 [details]
Patch
Comment 2 Geoffrey Garen 2021-04-06 12:18:01 PDT
Comment on attachment 425237 [details]
Patch

r=me

iOS-wk2 EWS failures seem unrelated
Comment 3 EWS 2021-04-06 13:43:06 PDT
Committed r275547: <https://commits.webkit.org/r275547>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425237 [details].
Comment 4 Radar WebKit Bug Importer 2021-04-06 13:44:17 PDT
<rdar://problem/76282457>
Comment 5 Darin Adler 2021-04-06 14:30:58 PDT
Comment on attachment 425237 [details]
Patch

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

> Source/WebCore/Modules/indexeddb/IndexedDB.h:62
> +enum class VersionNullness : uint8_t {

Why not bool?

> Source/WebCore/Modules/indexeddb/IndexedDB.h:78
> +enum class ObjectStoreRecordType : uint8_t {

Why not bool?

> Source/WebCore/Modules/indexeddb/IndexedDB.h:101
> +enum class GetAllType : uint8_t {

Why not bool?
Comment 6 Simon Fraser (smfr) 2021-04-06 14:48:55 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 425237 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=425237&action=review
> 
> > Source/WebCore/Modules/indexeddb/IndexedDB.h:62
> > +enum class VersionNullness : uint8_t {
> 
> Why not bool?

Do we prefer bool over uint8_t? Both are common in the code. If so, we should put this in the coding guidelines and update the style checker.
Comment 7 Darin Adler 2021-04-06 14:55:08 PDT
(In reply to Simon Fraser (smfr) from comment #6)
> Do we prefer bool over uint8_t? Both are common in the code. If so, we
> should put this in the coding guidelines and update the style checker.

I certainly do for things that are obviously "Yes/No". And I prefer them for anything where there are only two states. But maybe we don’t have consensus.

Makes sense that both are common. Having no type at all is also common.