Bug 204333 - Always enable Optional<OptionsStorage::Size> parse(const char* string) for OS(DARWIN).
Summary: Always enable Optional<OptionsStorage::Size> parse(const char* string) for OS...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-18 17:18 PST by Mark Lam
Modified: 2019-11-18 18:50 PST (History)
8 users (show)

See Also:


Attachments
proposed patch. (1.82 KB, patch)
2019-11-18 17:24 PST, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (1.55 KB, patch)
2019-11-18 18:30 PST, Mark Lam
ysuzuki: review+
Details | Formatted Diff | Diff

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