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

Side by Side Diff: Source/wtf/ThreadingWin.cpp

Issue 48833002: Move all static constants in dtoa/cached-powers.* to .rodata section (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Windows build failure Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. 4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 { 150 {
151 static Mutex mutex; 151 static Mutex mutex;
152 return mutex; 152 return mutex;
153 } 153 }
154 154
155 void initializeThreading() 155 void initializeThreading()
156 { 156 {
157 // This should only be called once. 157 // This should only be called once.
158 ASSERT(!atomicallyInitializedStaticMutex); 158 ASSERT(!atomicallyInitializedStaticMutex);
159 159
160 WTF::double_conversion::initialize();
161 // StringImpl::empty() does not construct its static string in a threadsafe fashion, 160 // StringImpl::empty() does not construct its static string in a threadsafe fashion,
162 // so ensure it has been initialized from here. 161 // so ensure it has been initialized from here.
163 StringImpl::empty(); 162 StringImpl::empty();
164 atomicallyInitializedStaticMutex = new Mutex; 163 atomicallyInitializedStaticMutex = new Mutex;
165 threadMapMutex(); 164 threadMapMutex();
166 wtfThreadData(); 165 wtfThreadData();
167 s_dtoaP5Mutex = new Mutex; 166 s_dtoaP5Mutex = new Mutex;
168 initializeDates(); 167 initializeDates();
169 } 168 }
170 169
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 // Time is too far in the future (and would overflow unsigned long) - wait f orever. 484 // Time is too far in the future (and would overflow unsigned long) - wait f orever.
486 if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0) 485 if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0)
487 return INFINITE; 486 return INFINITE;
488 487
489 return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0); 488 return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0);
490 } 489 }
491 490
492 } // namespace WTF 491 } // namespace WTF
493 492
494 #endif // OS(WIN) 493 #endif // OS(WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698