Revision: 19765
Author: [email protected]
Date: Mon Mar 10 16:05:29 2014 UTC
Log: Revert "Check and clear date cache in DateCurrentTime,
DateLocalTimezone and getTimezoneOffset."
This reverts commit r19711 for breaking WebKit tests.
http://build.chromium.org/p/tryserver.chromium/builders/win_rel/builds/278551/steps/content_browsertests/logs/AccessibilityMessagesQueueWhileSwappedOut
[email protected]
Review URL: https://codereview.chromium.org/192903002
http://code.google.com/p/v8/source/detail?r=19765
Modified:
/branches/bleeding_edge/src/date.h
/branches/bleeding_edge/src/date.js
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/runtime.cc
=======================================
--- /branches/bleeding_edge/src/date.h Fri Mar 7 10:01:00 2014 UTC
+++ /branches/bleeding_edge/src/date.h Mon Mar 10 16:05:29 2014 UTC
@@ -121,13 +121,6 @@
int64_t local_ms = ToLocal(time_ms);
return static_cast<int>((time_ms - local_ms) / kMsPerMin);
}
-
- void CheckTimezone() {
- if (local_offset_ms_ != kInvalidLocalOffsetInMs &&
- local_offset_ms_ != GetLocalOffsetFromOS()) {
- ResetDateCache();
- }
- }
// ECMA 262 - 15.9.1.9
int64_t ToLocal(int64_t time_ms) {
=======================================
--- /branches/bleeding_edge/src/date.js Fri Mar 7 10:01:00 2014 UTC
+++ /branches/bleeding_edge/src/date.js Mon Mar 10 16:05:29 2014 UTC
@@ -42,19 +42,16 @@
var timezone_cache_time = NAN;
-var timezone_cache_timezone_offset = NAN;
var timezone_cache_timezone;
-function LocalTimezone(t, timezone_offset) {
+function LocalTimezone(t) {
if (NUMBER_IS_NAN(t)) return "";
- if (t == timezone_cache_time &&
- timezone_offset == timezone_cache_timezone_offset) {
+ if (t == timezone_cache_time) {
return timezone_cache_timezone;
}
var timezone = %DateLocalTimezone(t);
timezone_cache_time = t;
timezone_cache_timezone = timezone;
- timezone_cache_timezone_offset = timezone_offset;
return timezone;
}
@@ -248,8 +245,9 @@
function LocalTimezoneString(date) {
+ var timezone = LocalTimezone(UTC_DATE_VALUE(date));
+
var timezoneOffset = -TIMEZONE_OFFSET(date);
- var timezone = LocalTimezone(UTC_DATE_VALUE(date), timezoneOffset);
var sign = (timezoneOffset >= 0) ? 1 : -1;
var hours = FLOOR((sign * timezoneOffset)/60);
var min = FLOOR((sign * timezoneOffset)%60);
=======================================
--- /branches/bleeding_edge/src/objects.cc Mon Mar 10 12:08:17 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Mon Mar 10 16:05:29 2014 UTC
@@ -16342,7 +16342,6 @@
int64_t time_ms = static_cast<int64_t>(value);
if (index == kTimezoneOffset) {
- date_cache->CheckTimezone();
return Smi::FromInt(date_cache->TimezoneOffset(time_ms));
}
=======================================
--- /branches/bleeding_edge/src/runtime.cc Mon Mar 10 12:23:05 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc Mon Mar 10 16:05:29 2014 UTC
@@ -9549,7 +9549,6 @@
// time is milliseconds. Therefore, we floor the result of getting
// the OS time.
double millis = std::floor(OS::TimeCurrentMillis());
- isolate->date_cache()->CheckTimezone();
return isolate->heap()->NumberFromDouble(millis);
}
@@ -9596,7 +9595,6 @@
ASSERT(args.length() == 1);
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
- isolate->date_cache()->CheckTimezone();
int64_t time =
isolate->date_cache()->EquivalentTime(static_cast<int64_t>(x));
const char* zone = OS::LocalTimezone(static_cast<double>(time));
return isolate->heap()->AllocateStringFromUtf8(CStrVector(zone));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.