Blame SOURCES/icu60.patch

7adb9b
--- a/Source/JavaScriptCore/runtime/IntlCache.cpp	
7adb9b
+++ a/Source/JavaScriptCore/runtime/IntlCache.cpp	
7adb9b
@@ -26,6 +26,7 @@ 
7adb9b
 #include "config.h"
7adb9b
 #include "IntlCache.h"
7adb9b
 
7adb9b
+#include "IntlDisplayNames.h"
7adb9b
 #include <wtf/Vector.h>
7adb9b
 
7adb9b
 namespace JSC {
7adb9b
@@ -53,6 +54,7 @@ Vector<UChar, 32> IntlCache::getBestDateTimePattern(const CString& locale, const
7adb9b
     return patternBuffer;
7adb9b
 }
7adb9b
 
7adb9b
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
7adb9b
 Vector<UChar, 32> IntlCache::getFieldDisplayName(const CString& locale, UDateTimePatternField field, UDateTimePGDisplayWidth width, UErrorCode& status)
7adb9b
 {
7adb9b
     auto sharedGenerator = getSharedPatternGenerator(locale, status);
7adb9b
@@ -64,5 +66,6 @@ Vector<UChar, 32> IntlCache::getFieldDisplayName(const CString& locale, UDateTim
7adb9b
         return { };
7adb9b
     return buffer;
7adb9b
 }
7adb9b
+#endif
7adb9b
 
7adb9b
 } // namespace JSC
7adb9b
--- a/Source/JavaScriptCore/runtime/IntlCache.h	
7adb9b
+++ a/Source/JavaScriptCore/runtime/IntlCache.h	
7adb9b
@@ -25,6 +25,7 @@ 
7adb9b
 
7adb9b
 #pragma once
7adb9b
 
7adb9b
+#include "IntlDisplayNames.h"
7adb9b
 #include <unicode/udatpg.h>
7adb9b
 #include <wtf/Noncopyable.h>
7adb9b
 #include <wtf/text/CString.h>
7adb9b
@@ -39,7 +40,9 @@ public:
7adb9b
     IntlCache() = default;
7adb9b
 
7adb9b
     Vector<UChar, 32> getBestDateTimePattern(const CString& locale, const UChar* skeleton, unsigned skeletonSize, UErrorCode&);
7adb9b
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
7adb9b
     Vector<UChar, 32> getFieldDisplayName(const CString& locale, UDateTimePatternField, UDateTimePGDisplayWidth, UErrorCode&);
7adb9b
+#endif
7adb9b
 
7adb9b
 private:
7adb9b
     UDateTimePatternGenerator* getSharedPatternGenerator(const CString& locale, UErrorCode& status)
7adb9b
--- a/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp	
7adb9b
+++ a/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp	
7adb9b
@@ -110,6 +110,7 @@ void IntlDisplayNames::initializeDisplayNames(JSGlobalObject* globalObject, JSVa
7adb9b
     m_languageDisplay = intlOption<LanguageDisplay>(globalObject, options, vm.propertyNames->languageDisplay, { { "dialect"_s, LanguageDisplay::Dialect }, { "standard"_s, LanguageDisplay::Standard } }, "languageDisplay must be either \"dialect\" or \"standard\""_s, LanguageDisplay::Dialect);
7adb9b
     RETURN_IF_EXCEPTION(scope, void());
7adb9b
 
7adb9b
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
7adb9b
     UErrorCode status = U_ZERO_ERROR;
7adb9b
 
7adb9b
     UDisplayContext contexts[] = {
7adb9b
@@ -137,6 +138,10 @@ void IntlDisplayNames::initializeDisplayNames(JSGlobalObject* globalObject, JSVa
7adb9b
         throwTypeError(globalObject, scope, "failed to initialize DisplayNames"_s);
7adb9b
         return;
7adb9b
     }
7adb9b
+#else
7adb9b
+    throwTypeError(globalObject, scope, "Failed to initialize Intl.DisplayNames since used feature is not supported in the linked ICU version"_s);
7adb9b
+    return;
7adb9b
+#endif
7adb9b
 }
7adb9b
 
7adb9b
 // https://tc39.es/proposal-intl-displaynames/#sec-Intl.DisplayNames.prototype.of
7adb9b
@@ -146,6 +151,7 @@ JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) co
7adb9b
     VM& vm = globalObject->vm();
7adb9b
     auto scope = DECLARE_THROW_SCOPE(vm);
7adb9b
 
7adb9b
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
7adb9b
     ASSERT(m_displayNames);
7adb9b
     auto code = codeValue.toWTFString(globalObject);
7adb9b
     RETURN_IF_EXCEPTION(scope, { });
7adb9b
@@ -350,6 +356,11 @@ JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) co
7adb9b
         return throwTypeError(globalObject, scope, "Failed to query a display name."_s);
7adb9b
     }
7adb9b
     return jsString(vm, String(buffer));
7adb9b
+#else
7adb9b
+    UNUSED_PARAM(codeValue);
7adb9b
+    throwTypeError(globalObject, scope, "Failed to initialize Intl.DisplayNames since used feature is not supported in the linked ICU version"_s);
7adb9b
+    return { };
7adb9b
+#endif
7adb9b
 }
7adb9b
 
7adb9b
 // https://tc39.es/proposal-intl-displaynames/#sec-Intl.DisplayNames.prototype.resolvedOptions
7adb9b
--- a/Source/JavaScriptCore/runtime/IntlDisplayNames.h	
7adb9b
+++ a/Source/JavaScriptCore/runtime/IntlDisplayNames.h	
7adb9b
@@ -31,6 +31,13 @@ 
7adb9b
 
7adb9b
 namespace JSC {
7adb9b
 
7adb9b
+#if !defined(HAVE_ICU_U_LOCALE_DISPLAY_NAMES)
7adb9b
+// We need 61 or later since part of implementation uses UCURR_NARROW_SYMBOL_NAME.
7adb9b
+#if U_ICU_VERSION_MAJOR_NUM >= 61
7adb9b
+#define HAVE_ICU_U_LOCALE_DISPLAY_NAMES 1
7adb9b
+#endif
7adb9b
+#endif
7adb9b
+
7adb9b
 enum class RelevantExtensionKey : uint8_t;
7adb9b
 
7adb9b
 class IntlDisplayNames final : public JSNonFinalObject {
7adb9b
--- a/Source/JavaScriptCore/runtime/IntlObject.cpp	
7adb9b
+++ a/Source/JavaScriptCore/runtime/IntlObject.cpp	
7adb9b
@@ -153,7 +153,6 @@ namespace JSC {
7adb9b
   getCanonicalLocales   intlObjectFuncGetCanonicalLocales            DontEnum|Function 1
7adb9b
   Collator              createCollatorConstructor                    DontEnum|PropertyCallback
7adb9b
   DateTimeFormat        createDateTimeFormatConstructor              DontEnum|PropertyCallback
7adb9b
-  DisplayNames          createDisplayNamesConstructor                DontEnum|PropertyCallback
7adb9b
   Locale                createLocaleConstructor                      DontEnum|PropertyCallback
7adb9b
   NumberFormat          createNumberFormatConstructor                DontEnum|PropertyCallback
7adb9b
   PluralRules           createPluralRulesConstructor                 DontEnum|PropertyCallback
7adb9b
@@ -239,6 +238,11 @@ void IntlObject::finishCreation(VM& vm, JSGlobalObject* globalObject)
7adb9b
     Base::finishCreation(vm);
7adb9b
     ASSERT(inherits(vm, info()));
7adb9b
     JSC_TO_STRING_TAG_WITHOUT_TRANSITION();
7adb9b
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
7adb9b
+    putDirectWithoutTransition(vm, vm.propertyNames->DisplayNames, createDisplayNamesConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
7adb9b
+#else
7adb9b
+    UNUSED_PARAM(&createDisplayNamesConstructor);
7adb9b
+#endif
7adb9b
 #if HAVE(ICU_U_LIST_FORMATTER)
7adb9b
     putDirectWithoutTransition(vm, vm.propertyNames->ListFormat, createListFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
7adb9b
 #else
7adb9b
--- a/Source/cmake/OptionsGTK.cmake	
7adb9b
+++ a/Source/cmake/OptionsGTK.cmake	
7adb9b
@@ -14,7 +14,7 @@ find_package(Freetype 2.4.2 REQUIRED)
7adb9b
 find_package(LibGcrypt 1.6.0 REQUIRED)
7adb9b
 find_package(GLIB 2.56.4 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
7adb9b
 find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
7adb9b
-find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc)
7adb9b
+find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc)
7adb9b
 find_package(JPEG REQUIRED)
7adb9b
 find_package(LibXml2 2.8.0 REQUIRED)
7adb9b
 find_package(PNG REQUIRED)