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

Side by Side Diff: src/date.cc

Issue 193933002: Invalidate OS-specific datetime cache on configuration change notification (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 ASSERT(stamp_ != Smi::FromInt(kInvalidStamp)); 56 ASSERT(stamp_ != Smi::FromInt(kInvalidStamp));
57 for (int i = 0; i < kDSTSize; ++i) { 57 for (int i = 0; i < kDSTSize; ++i) {
58 ClearSegment(&dst_[i]); 58 ClearSegment(&dst_[i]);
59 } 59 }
60 dst_usage_counter_ = 0; 60 dst_usage_counter_ = 0;
61 before_ = &dst_[0]; 61 before_ = &dst_[0];
62 after_ = &dst_[1]; 62 after_ = &dst_[1];
63 local_offset_ms_ = kInvalidLocalOffsetInMs; 63 local_offset_ms_ = kInvalidLocalOffsetInMs;
64 ymd_valid_ = false; 64 ymd_valid_ = false;
65 OS::TimeZoneChanged();
65 } 66 }
66 67
67 68
68 void DateCache::ClearSegment(DST* segment) { 69 void DateCache::ClearSegment(DST* segment) {
69 segment->start_sec = kMaxEpochTimeInSec; 70 segment->start_sec = kMaxEpochTimeInSec;
70 segment->end_sec = -kMaxEpochTimeInSec; 71 segment->end_sec = -kMaxEpochTimeInSec;
71 segment->offset_ms = 0; 72 segment->offset_ms = 0;
72 segment->last_used = 0; 73 segment->last_used = 0;
73 } 74 }
74 75
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 if (&dst_[i] == skip) continue; 375 if (&dst_[i] == skip) continue;
375 if (result == NULL || result->last_used > dst_[i].last_used) { 376 if (result == NULL || result->last_used > dst_[i].last_used) {
376 result = &dst_[i]; 377 result = &dst_[i];
377 } 378 }
378 } 379 }
379 ClearSegment(result); 380 ClearSegment(result);
380 return result; 381 return result;
381 } 382 }
382 383
383 } } // namespace v8::internal 384 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698