Bug 224961

Summary: Modernize ShareableResource::Handle
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: NEW ---    
Severity: Normal CC: cdumez, cgarcia, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Alex Christensen 2021-04-22 17:11:58 PDT
Modernize ShareableResource::Handle
Comment 1 Alex Christensen 2021-04-22 17:13:19 PDT
Created attachment 426869 [details]
Patch
Comment 2 Chris Dumez 2021-04-27 09:50:50 PDT
iOS bots are red.
Comment 3 Alex Christensen 2021-04-27 10:48:20 PDT
Created attachment 427165 [details]
Patch
Comment 4 Chris Dumez 2021-04-27 10:51:01 PDT
Comment on attachment 427165 [details]
Patch

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

> Source/WebKit/Shared/ShareableResource.cpp:148
> +auto ShareableResource::createHandle() -> Optional<Handle>

It seems weird to use Optional<Handle> considering that Handle has a "null" state and a isNull() function.

For example, we purposely avoid using Optional<String> in the code base, for this exact reason.

I think we could simply return a null Handle in case of failure.
Comment 5 Radar WebKit Bug Importer 2021-04-29 17:12:16 PDT
<rdar://problem/77351694>