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

Unified Diff: src/base/platform/platform-win32.cc

Issue 2184673002: [base] Use thread safe localtime_r() instead of localtime(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/base/platform/platform-solaris.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/platform-win32.cc
diff --git a/src/base/platform/platform-win32.cc b/src/base/platform/platform-win32.cc
index d4c2a10bd697cab501f9db460606af22c730b30f..080e6bc0af9c6f631285adb810861e50fc2ce1ae 100644
--- a/src/base/platform/platform-win32.cc
+++ b/src/base/platform/platform-win32.cc
@@ -46,9 +46,8 @@ inline void MemoryBarrier() {
int localtime_s(tm* out_tm, const time_t* time) {
- tm* posix_local_time_struct = localtime(time); // NOLINT
+ tm* posix_local_time_struct = localtime_r(time, out_tm);
if (posix_local_time_struct == NULL) return 1;
- *out_tm = *posix_local_time_struct;
return 0;
}
« no previous file with comments | « src/base/platform/platform-solaris.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698