Skip to content

Commit

Permalink
Bug 1198216 - Check for presence of ICU::Timezone::recreateDefault() …
Browse files Browse the repository at this point in the history
…before using. r=jwalden
  • Loading branch information
tedders1 committed Aug 27, 2015
1 parent c94a10c commit 52fd2b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion intl/icu-patches/bug-1172609-timezone-recreateDefault.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
+
/**
Expand Down
1 change: 1 addition & 0 deletions intl/icu/source/i18n/unicode/timezone.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ class U_I18N_API TimeZone : public UObject {
*/
static TimeZone* U_EXPORT2 createDefault(void);

#define ICU_TZ_HAS_RECREATE_DEFAULT
static void U_EXPORT2 recreateDefault();

/**
Expand Down
2 changes: 1 addition & 1 deletion js/src/jsapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 52fd2b9

Please sign in to comment.