Bug 1172609 - Part 5: Add js::ResetTimeZone() function. r=waldo, r=ted

This commit is contained in:
Ted Clancy 2015-06-15 00:33:02 -07:00
parent a9a82b5233
commit fc9dbc6bcf
3 changed files with 14 additions and 0 deletions

View File

@ -78,6 +78,7 @@ included_inclnames_to_ignore = set([
'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

View File

@ -66,6 +66,7 @@
#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
@ -6253,3 +6254,12 @@ JS::GetObjectZone(JSObject* obj)
{
return obj->zone();
}
JS_PUBLIC_API(void)
JS::ResetTimeZone()
{
#if ENABLE_INTL_API
icu::TimeZone::recreateDefault();
#endif
}

View File

@ -39,6 +39,9 @@
namespace JS {
extern JS_PUBLIC_API(void)
ResetTimeZone();
class TwoByteChars;
#ifdef JS_DEBUG