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

Side by Side Diff: src/platform-posix.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 | « src/platform.h ('k') | src/platform-win32.cc » ('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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 double OS::DaylightSavingsOffset(double time) { 357 double OS::DaylightSavingsOffset(double time) {
358 if (std::isnan(time)) return nan_value(); 358 if (std::isnan(time)) return nan_value();
359 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); 359 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
360 struct tm* t = localtime(&tv); 360 struct tm* t = localtime(&tv);
361 if (NULL == t) return nan_value(); 361 if (NULL == t) return nan_value();
362 return t->tm_isdst > 0 ? 3600 * msPerSecond : 0; 362 return t->tm_isdst > 0 ? 3600 * msPerSecond : 0;
363 } 363 }
364 364
365 365
366 void OS::TimeZoneChanged() {}
367
368
366 int OS::GetLastError() { 369 int OS::GetLastError() {
367 return errno; 370 return errno;
368 } 371 }
369 372
370 373
371 // ---------------------------------------------------------------------------- 374 // ----------------------------------------------------------------------------
372 // POSIX stdio support. 375 // POSIX stdio support.
373 // 376 //
374 377
375 FILE* OS::FOpen(const char* path, const char* mode) { 378 FILE* OS::FOpen(const char* path, const char* mode) {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 781
779 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 782 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
780 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 783 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
781 int result = pthread_setspecific(pthread_key, value); 784 int result = pthread_setspecific(pthread_key, value);
782 ASSERT_EQ(0, result); 785 ASSERT_EQ(0, result);
783 USE(result); 786 USE(result);
784 } 787 }
785 788
786 789
787 } } // namespace v8::internal 790 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698