Bug 204333

Summary: Always enable Optional<OptionsStorage::Size> parse(const char* string) for OS(DARWIN).
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, krollin, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
none
proposed patch. ysuzuki: review+

Description Mark Lam 2019-11-18 17:18:37 PST
<rdar://problem/57303785>
Comment 1 Mark Lam 2019-11-18 17:24:40 PST
Created attachment 383815 [details]
proposed patch.

Let's try this on the EWS.
Comment 2 Mark Lam 2019-11-18 17:36:38 PST
Sadly, it looks the static_assert trick does not solve this problem.  I'll investigate alternate solutions.
Comment 3 Mark Lam 2019-11-18 18:30:54 PST
Created attachment 383832 [details]
proposed patch.
Comment 4 Yusuke Suzuki 2019-11-18 18:39:44 PST
Comment on attachment 383832 [details]
proposed patch.

r=me. BTW, how about replacing size_t with uint64_t (or uint32_t) completely?
Comment 5 Mark Lam 2019-11-18 18:43:57 PST
Thanks for the reviewer.

(In reply to Yusuke Suzuki from comment #4)
> Comment on attachment 383832 [details]
> proposed patch.
> 
> r=me. BTW, how about replacing size_t with uint64_t (or uint32_t) completely?

I kinda like it as it is because it's clearer this way that the parse() functions map to each option storage type.
Comment 6 Mark Lam 2019-11-18 18:49:17 PST
Landed in r252618: <http://trac.webkit.org/r252618>.