Changeset 181545 in webkit
- Timestamp:
- Mar 16, 2015, 4:47:11 AM (11 years ago)
- Location:
- releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGCommon.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/ChangeLog
r181541 r181545 1 2015-03-12 Mark Lam <mark.lam@apple.com> 2 3 Change the DFG crashLock to use std::atomic. 4 <https://webkit.org/b/142649> 5 6 Reviewed by Filip Pizlo. 7 8 * dfg/DFGCommon.cpp: 9 (JSC::DFG::startCrashing): 10 (JSC::DFG::isCrashing): 11 1 12 2015-03-12 Mark Lam <mark.lam@apple.com> 2 13 -
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/dfg/DFGCommon.cpp
r171380 r181545 34 34 namespace JSC { namespace DFG { 35 35 36 static unsignedcrashLock;36 static std::atomic<unsigned> crashLock; 37 37 38 38 void startCrashing() 39 39 { 40 #if ENABLE(COMPARE_AND_SWAP) 41 while (! WTF::weakCompareAndSwap(&crashLock, 0, 1))40 unsigned expected = 0; 41 while (!crashLock.compare_exchange_weak(expected, 1, std::memory_order_acquire)) { 42 42 std::this_thread::yield(); 43 #else 44 crashLock = 1; 45 #endif 43 expected = 0; 44 } 46 45 } 47 46 48 47 bool isCrashing() 49 48 { 50 return !!crashLock ;49 return !!crashLock.load(std::memory_order_acquire); 51 50 } 52 51
Note:
See TracChangeset
for help on using the changeset viewer.