Bug 1198216 - Check for presence of ICU::Timezone::recreateDefault() before using. r=jwalden

This commit is contained in:
Ted Clancy 2015-08-27 07:57:19 -07:00
parent c94a10c345
commit 52fd2b978f
3 changed files with 4 additions and 2 deletions

View File

@ -63,7 +63,7 @@ diff --git a/intl/icu/source/i18n/timezone.cpp b/intl/icu/source/i18n/timezone.c
diff --git a/intl/icu/source/i18n/unicode/timezone.h b/intl/icu/source/i18n/unicode/timezone.h
--- a/intl/icu/source/i18n/unicode/timezone.h
+++ b/intl/icu/source/i18n/unicode/timezone.h
@@ -299,16 +299,18 @@ public:
@@ -299,16 +299,19 @@ public:
* and made the default.
*
* @return A default TimeZone. Clients are responsible for deleting the time zone
@ -72,6 +72,7 @@ diff --git a/intl/icu/source/i18n/unicode/timezone.h b/intl/icu/source/i18n/unic
*/
static TimeZone* U_EXPORT2 createDefault(void);
+#define ICU_TZ_HAS_RECREATE_DEFAULT
+ static void U_EXPORT2 recreateDefault();
+
/**

View File

@ -304,6 +304,7 @@ public:
*/
static TimeZone* U_EXPORT2 createDefault(void);
#define ICU_TZ_HAS_RECREATE_DEFAULT
static void U_EXPORT2 recreateDefault();
/**

View File

@ -6268,7 +6268,7 @@ JS::GetObjectZone(JSObject* obj)
JS_PUBLIC_API(void)
JS::ResetTimeZone()
{
#if ENABLE_INTL_API
#if ENABLE_INTL_API && defined(ICU_TZ_HAS_RECREATE_DEFAULT)
icu::TimeZone::recreateDefault();
#endif
}