Bug 196098

Summary: [JSC] Fix JSC build with newer ICU
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch keith_miller: review+

Description Yusuke Suzuki 2019-03-21 11:42:37 PDT
[JSC] Fix JSC build with newer ICU
Comment 1 Yusuke Suzuki 2019-03-21 11:45:46 PDT
Created attachment 365580 [details]
Patch
Comment 2 Yusuke Suzuki 2019-03-21 11:46:25 PDT
<rdar://problem/49113565>
Comment 3 Keith Miller 2019-03-21 11:49:56 PDT
Comment on attachment 365580 [details]
Patch

Would we rather be forced to to handle new cases? Maybe debug builds shouldn't have the default?
Comment 4 Yusuke Suzuki 2019-03-21 11:56:18 PDT
(In reply to Keith Miller from comment #3)
> Comment on attachment 365580 [details]
> Patch
> 
> Would we rather be forced to to handle new cases? Maybe debug builds
> shouldn't have the default?

I think that "default" is OK here. This is because newly added fields are not handled in ECMAScript until it is specified in the ECMA402 spec.
If we do not use "default" clause here, we will notice that a new enum field is added in ICU side.
But it does not mean we should handle it at that time. 
When we handle it, we will see the proposal/spec and add it here anyway.
Comment 5 Keith Miller 2019-03-21 11:58:57 PDT
(In reply to Yusuke Suzuki from comment #4)
> (In reply to Keith Miller from comment #3)
> > Comment on attachment 365580 [details]
> > Patch
> > 
> > Would we rather be forced to to handle new cases? Maybe debug builds
> > shouldn't have the default?
> 
> I think that "default" is OK here. This is because newly added fields are
> not handled in ECMAScript until it is specified in the ECMA402 spec.
> If we do not use "default" clause here, we will notice that a new enum field
> is added in ICU side.
> But it does not mean we should handle it at that time. 
> When we handle it, we will see the proposal/spec and add it here anyway.

Sounds good. r=me
Comment 6 Yusuke Suzuki 2019-03-21 12:09:16 PDT
Committed r243311: <https://trac.webkit.org/changeset/243311>