Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1108)

Unified Diff: src/runtime/runtime-i18n.cc

Issue 1985423003: Invalidate defaultObjects if timezone changes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes after review Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/test-date.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-i18n.cc
diff --git a/src/runtime/runtime-i18n.cc b/src/runtime/runtime-i18n.cc
index 555d9e22a4d177b3feb68f076fb8e639ec6a09c3..f3d023a24fe5a460d71c38d411405858cc18ec44 100644
--- a/src/runtime/runtime-i18n.cc
+++ b/src/runtime/runtime-i18n.cc
@@ -1105,6 +1105,23 @@ RUNTIME_FUNCTION(Runtime_StringLocaleConvertCase) {
reinterpret_cast<const char*>(lang_str));
}
+RUNTIME_FUNCTION(Runtime_DateCacheVersion) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(0, args.length());
+ if (isolate->serializer_enabled()) return isolate->heap()->undefined_value();
+ if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) {
+ Handle<FixedArray> date_cache_version =
+ isolate->factory()->NewFixedArray(1, TENURED);
+ date_cache_version->set(0, Smi::FromInt(0));
+ isolate->eternal_handles()->CreateSingleton(
+ isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION);
+ }
+ Handle<FixedArray> date_cache_version =
+ Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton(
+ EternalHandles::DATE_CACHE_VERSION));
+ return date_cache_version->get(0);
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/test-date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698