Bug 1172609 - Part 5: Add js::ResetTimeZone() function. r=waldo, r=ted
authorTed Clancy <tclancy@mozilla.com>
Mon, 15 Jun 2015 00:33:02 -0700
changeset 259004 3be69e9052d45581b6822a37fca40d3d74962114
parent 259003 858873762b603637e889a76c1b85dd09ab64ed32
child 259005 382365abacdec3ca2558667f37ef0aab7a7c929f
push id29268
push userryanvm@gmail.com
push dateTue, 25 Aug 2015 00:37:23 +0000
treeherdermozilla-central@08015770c9d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo, ted
bugs1172609
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 1172609 - Part 5: Add js::ResetTimeZone() function. r=waldo, r=ted
config/check_spidermonkey_style.py
js/src/jsapi.cpp
js/src/jsapi.h
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -73,16 +73,17 @@ included_inclnames_to_ignore = set([
     'prlink.h',                 # NSPR
     'prlock.h',                 # NSPR
     'prprf.h',                  # NSPR
     'prthread.h',               # NSPR
     'prtypes.h',                # NSPR
     'selfhosted.out.h',         # generated in $OBJDIR
     'unicode/locid.h',          # ICU
     'unicode/numsys.h',         # ICU
+    'unicode/timezone.h',       # ICU
     'unicode/ucal.h',           # ICU
     'unicode/uclean.h',         # ICU
     'unicode/ucol.h',           # ICU
     'unicode/udat.h',           # ICU
     'unicode/udatpg.h',         # ICU
     'unicode/uenum.h',          # ICU
     'unicode/unorm.h',          # ICU
     'unicode/unum.h',           # ICU
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -61,16 +61,17 @@
 #include "jit/JitCommon.h"
 #include "js/CharacterEncoding.h"
 #include "js/Conversions.h"
 #include "js/Date.h"
 #include "js/Proxy.h"
 #include "js/SliceBudget.h"
 #include "js/StructuredClone.h"
 #if ENABLE_INTL_API
+#include "unicode/timezone.h"
 #include "unicode/uclean.h"
 #include "unicode/utypes.h"
 #endif // ENABLE_INTL_API
 #include "vm/DateObject.h"
 #include "vm/Debugger.h"
 #include "vm/ErrorObject.h"
 #include "vm/HelperThreads.h"
 #include "vm/Interpreter.h"
@@ -6248,8 +6249,17 @@ JS::CaptureCurrentStack(JSContext* cx, J
     return true;
 }
 
 JS_PUBLIC_API(Zone*)
 JS::GetObjectZone(JSObject* obj)
 {
     return obj->zone();
 }
+
+JS_PUBLIC_API(void)
+JS::ResetTimeZone()
+{
+#if ENABLE_INTL_API
+    icu::TimeZone::recreateDefault();
+#endif
+}
+
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -34,16 +34,19 @@
 #include "js/Utility.h"
 #include "js/Value.h"
 #include "js/Vector.h"
 
 /************************************************************************/
 
 namespace JS {
 
+extern JS_PUBLIC_API(void)
+ResetTimeZone();
+
 class TwoByteChars;
 
 #ifdef JS_DEBUG
 
 class JS_PUBLIC_API(AutoCheckRequestDepth)
 {
     JSContext* cx;
   public: