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

Side by Side Diff: src/platform-win32.cc

Issue 160451: Guard local time posix functions from NaN value of invalid dates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 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-posix.cc ('k') | test/mjsunit/mjsunit.status » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 596 }
597 597
598 // Returns the tickcounter based on timeGetTime. 598 // Returns the tickcounter based on timeGetTime.
599 int64_t OS::Ticks() { 599 int64_t OS::Ticks() {
600 return timeGetTime() * 1000; // Convert to microseconds. 600 return timeGetTime() * 1000; // Convert to microseconds.
601 } 601 }
602 602
603 603
604 // Returns a string identifying the current timezone taking into 604 // Returns a string identifying the current timezone taking into
605 // account daylight saving. 605 // account daylight saving.
606 char* OS::LocalTimezone(double time) { 606 const char* OS::LocalTimezone(double time) {
607 return Time(time).LocalTimezone(); 607 return Time(time).LocalTimezone();
608 } 608 }
609 609
610 610
611 // Returns the local time offset in milliseconds east of UTC without 611 // Returns the local time offset in milliseconds east of UTC without
612 // taking daylight savings time into account. 612 // taking daylight savings time into account.
613 double OS::LocalTimeOffset() { 613 double OS::LocalTimeOffset() {
614 // Use current time, rounded to the millisecond. 614 // Use current time, rounded to the millisecond.
615 Time t(TimeCurrentMillis()); 615 Time t(TimeCurrentMillis());
616 // Time::LocalOffset inlcudes any daylight savings offset, so subtract it. 616 // Time::LocalOffset inlcudes any daylight savings offset, so subtract it.
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 1868
1869 // Release the thread handles 1869 // Release the thread handles
1870 CloseHandle(data_->sampler_thread_); 1870 CloseHandle(data_->sampler_thread_);
1871 CloseHandle(data_->profiled_thread_); 1871 CloseHandle(data_->profiled_thread_);
1872 } 1872 }
1873 1873
1874 1874
1875 #endif // ENABLE_LOGGING_AND_PROFILING 1875 #endif // ENABLE_LOGGING_AND_PROFILING
1876 1876
1877 } } // namespace v8::internal 1877 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-posix.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698