Bug 1198216 - Check for presence of ICU::Timezone::recreateDefault() before using. r=jwalden
authorTed Clancy <tclancy@mozilla.com>
Thu, 27 Aug 2015 07:57:19 -0700
changeset 260880 10c7b61d6ec9e058439f0a61d836bc22c3bf2115
parent 260879 20ab8a8bdd20f3de8a7dc0bfe9480bbe30aa2dcc
child 260881 5899ac3e7447b7268ec9645bbf83044b4a873c1b
push id29329
push userkwierso@gmail.com
push dateFri, 04 Sep 2015 22:34:50 +0000
treeherdermozilla-central@e816a7a854a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1198216
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1198216 - Check for presence of ICU::Timezone::recreateDefault() before using. r=jwalden
intl/icu-patches/bug-1172609-timezone-recreateDefault.diff
intl/icu/source/i18n/unicode/timezone.h
js/src/jsapi.cpp
--- a/intl/icu-patches/bug-1172609-timezone-recreateDefault.diff
+++ b/intl/icu-patches/bug-1172609-timezone-recreateDefault.diff
@@ -58,25 +58,26 @@ diff --git a/intl/icu/source/i18n/timezo
          ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup);
      }
  }
  // -------------------------------------
  
 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
       *           object returned.
       * @stable ICU 2.0
       */
      static TimeZone* U_EXPORT2 createDefault(void);
  
++#define ICU_TZ_HAS_RECREATE_DEFAULT
 +    static void U_EXPORT2 recreateDefault();
 +
      /**
       * Sets the default time zone (i.e., what's returned by createDefault()) to be the
       * specified time zone.  If NULL is specified for the time zone, the default time
       * zone is set to the default host time zone.  This call adopts the TimeZone object
       * passed in; the client is no longer responsible for deleting it.
       *
--- a/intl/icu/source/i18n/unicode/timezone.h
+++ b/intl/icu/source/i18n/unicode/timezone.h
@@ -299,16 +299,17 @@ public:
      * and made the default.
      *
      * @return   A default TimeZone. Clients are responsible for deleting the time zone
      *           object returned.
      * @stable ICU 2.0
      */
     static TimeZone* U_EXPORT2 createDefault(void);
 
+#define ICU_TZ_HAS_RECREATE_DEFAULT
     static void U_EXPORT2 recreateDefault();
 
     /**
      * Sets the default time zone (i.e., what's returned by createDefault()) to be the
      * specified time zone.  If NULL is specified for the time zone, the default time
      * zone is set to the default host time zone.  This call adopts the TimeZone object
      * passed in; the client is no longer responsible for deleting it.
      *
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -6263,13 +6263,13 @@ JS_PUBLIC_API(Zone*)
 JS::GetObjectZone(JSObject* obj)
 {
     return obj->zone();
 }
 
 JS_PUBLIC_API(void)
 JS::ResetTimeZone()
 {
-#if ENABLE_INTL_API
+#if ENABLE_INTL_API && defined(ICU_TZ_HAS_RECREATE_DEFAULT)
     icu::TimeZone::recreateDefault();
 #endif
 }