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

Unified Diff: src/runtime.cc

Issue 9652030: Fix compile errors on Windows introduced by r10983. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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/objects.cc ('k') | test/mjsunit/date.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 196f872d6f8a6f7074e0d4b58e243a5425e5731f..cc5aeab78f55c46446b016f848fb60c3ceadc612 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7569,8 +7569,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateSetValue) {
if (isnan(time)) {
value = isolate->heap()->nan_value();
is_value_nan = true;
+ } else if (!is_utc &&
+ (time < -DateCache::kMaxTimeBeforeUTCInMs ||
+ time > DateCache::kMaxTimeBeforeUTCInMs)) {
+ value = isolate->heap()->nan_value();
+ is_value_nan = true;
} else {
- time = is_utc ? time : date_cache->ToUTC(time);
+ time = is_utc ? time : date_cache->ToUTC(static_cast<int64_t>(time));
if (time < -DateCache::kMaxTimeInMs ||
time > DateCache::kMaxTimeInMs) {
value = isolate->heap()->nan_value();
@@ -9059,7 +9064,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateLocalTimezone) {
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
int64_t time = isolate->date_cache()->EquivalentTime(static_cast<int64_t>(x));
- const char* zone = OS::LocalTimezone(time);
+ const char* zone = OS::LocalTimezone(static_cast<double>(time));
return isolate->heap()->AllocateStringFromUtf8(CStrVector(zone));
}
@@ -9071,7 +9076,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateToUTC) {
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
int64_t time = isolate->date_cache()->ToUTC(static_cast<int64_t>(x));
- return isolate->heap()->NumberFromDouble(time);
+ return isolate->heap()->NumberFromDouble(static_cast<double>(time));
}
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698