R=jkummerow@chromium.org
BUG=119815
TEST=Change the system time one day back: (new Date()) will return incorrect time.
Review URL: https://chromiumcodereview.appspot.com/9865021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11165
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
// Check if we need to resync due to elapsed time.
needs_resync |= (time_now.t_ - init_time.t_) > kMaxClockElapsedTime;
+ // Check if we need to resync due to backwards time change.
+ needs_resync |= time_now.t_ < init_time.t_;
+
// Resync the clock if necessary.
if (needs_resync) {
GetSystemTimeAsFileTime(&init_time.ft_);