[JSC] Fix JSC build with newer ICU
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 19:09:10 +0000 (19:09 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 19:09:10 +0000 (19:09 +0000)
commitddb8134a3ffa17c32c3c31aa5e3a6fa2c8603d24
treee6d30a1db7cd3e9a4e4ca3bab5079e2adb8eca54
parent79a4b9fde0d0457461046a29cb572c3d8f4bd150
[JSC] Fix JSC build with newer ICU
https://bugs.webkit.org/show_bug.cgi?id=196098

Reviewed by Keith Miller.

IntlDateTimeFormat and IntlNumberFormat have switch statement over ICU's enums. However it lacks "default" clause so that
the compile error occurs when a new enum value is added in ICU side. We should have "default" clause which just fallbacks
"unknown"_s case. The behavior is not changed since we already have `return "unknown"_s;` statement anyway after the
switch statement. This patch just suppresses a compile error.

* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::partTypeString):
* runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::partTypeString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
Source/JavaScriptCore/runtime/IntlNumberFormat.cpp