Sfoglia il codice sorgente

Add back ResetTimeZoneFactoryObjects

Jack Horton 8 anni fa
parent
commit
73449833c6

+ 6 - 0
lib/Runtime/Base/WindowsGlobalizationAdapter.cpp

@@ -459,6 +459,12 @@ if (this->object) \
         }
     }
 
+    void WindowsGlobalizationAdapter::ResetTimeZoneFactoryObjects()
+    {
+        DetachAndReleaseFactoryObjects(timeZoneCalendar);
+        DetachAndReleaseFactoryObjects(defaultTimeZoneCalendar);
+    }
+
     void WindowsGlobalizationAdapter::ResetDateTimeFormatFactoryObjects()
     {
         // Reset only if its not initialized completely.

+ 1 - 0
lib/Runtime/Base/WindowsGlobalizationAdapter.h

@@ -127,6 +127,7 @@ namespace Js
         HRESULT GetClock(_In_ Windows::Globalization::DateTimeFormatting::IDateTimeFormatter* formatter, HSTRING * hClock);
         HRESULT GetItemAt(_In_ Windows::Foundation::Collections::IVectorView<HSTRING>* vector, _In_ uint32 index, HSTRING * item);
         void ResetCommonFactoryObjects();
+        void ResetTimeZoneFactoryObjects();
         void ResetDateTimeFormatFactoryObjects();
         void ResetNumberFormatFactoryObjects();
 #endif // ENABLE_INTL_OBJECT