Chromium Code Reviews| Index: chrome/browser/renderer_host/render_sandbox_host_linux.cc |
| diff --git a/chrome/browser/renderer_host/render_sandbox_host_linux.cc b/chrome/browser/renderer_host/render_sandbox_host_linux.cc |
| index f7ca1451d27ebd00ac06553bc74e9fa9910960b9..7a9356b3fee668382a7185d61c980d5c98e70cf1 100644 |
| --- a/chrome/browser/renderer_host/render_sandbox_host_linux.cc |
| +++ b/chrome/browser/renderer_host/render_sandbox_host_linux.cc |
| @@ -296,14 +296,16 @@ class SandboxIPCProcess : public WebKitClient { |
| time_t time; |
| memcpy(&time, time_string.data(), sizeof(time)); |
| - struct tm expanded_time; |
| - localtime_r(&time, &expanded_time); |
| + // We use localtime here because we need the tm_zone field to be filled |
| + // out. Since we are a single-threaded process, this is safe. |
| + const struct tm* expanded_time = localtime(&time); |
| - const std::string result_string(reinterpret_cast<char*>(&expanded_time), |
| - sizeof(expanded_time)); |
| + const std::string result_string(reinterpret_cast<const char*>(expanded_time), |
|
tony
2009/07/22 20:01:41
Nit: 80 cols.
|
| + sizeof(struct tm)); |
| Pickle reply; |
| reply.WriteString(result_string); |
| + reply.WriteString(expanded_time->tm_zone); |
| SendRendererReply(fds, reply, -1); |
| } |