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

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

Issue 197023002: Fix a race in initialization of timezone cache in platform-win32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix CE 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-linux.cc ('k') | src/platform-openbsd.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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 LOG(isolate, 175 LOG(isolate,
176 SharedLibraryEvent(_dyld_get_image_name(i), start, start + size)); 176 SharedLibraryEvent(_dyld_get_image_name(i), start, start + size));
177 } 177 }
178 } 178 }
179 179
180 180
181 void OS::SignalCodeMovingGC() { 181 void OS::SignalCodeMovingGC() {
182 } 182 }
183 183
184 184
185 const char* OS::LocalTimezone(double time) { 185 const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
186 if (std::isnan(time)) return ""; 186 if (std::isnan(time)) return "";
187 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); 187 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
188 struct tm* t = localtime(&tv); 188 struct tm* t = localtime(&tv);
189 if (NULL == t) return ""; 189 if (NULL == t) return "";
190 return t->tm_zone; 190 return t->tm_zone;
191 } 191 }
192 192
193 193
194 double OS::LocalTimeOffset() { 194 double OS::LocalTimeOffset(TimezoneCache* cache) {
195 time_t tv = time(NULL); 195 time_t tv = time(NULL);
196 struct tm* t = localtime(&tv); 196 struct tm* t = localtime(&tv);
197 // tm_gmtoff includes any daylight savings offset, so subtract it. 197 // tm_gmtoff includes any daylight savings offset, so subtract it.
198 return static_cast<double>(t->tm_gmtoff * msPerSecond - 198 return static_cast<double>(t->tm_gmtoff * msPerSecond -
199 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); 199 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0));
200 } 200 }
201 201
202 202
203 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } 203 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { }
204 204
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 bool VirtualMemory::ReleaseRegion(void* address, size_t size) { 326 bool VirtualMemory::ReleaseRegion(void* address, size_t size) {
327 return munmap(address, size) == 0; 327 return munmap(address, size) == 0;
328 } 328 }
329 329
330 330
331 bool VirtualMemory::HasLazyCommits() { 331 bool VirtualMemory::HasLazyCommits() {
332 return false; 332 return false;
333 } 333 }
334 334
335 } } // namespace v8::internal 335 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | src/platform-openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698