Changeset 34991 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 3, 2008, 5:06:11 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r34990 r34991 1 2008-07-03 Mark Rowe <[email protected]> 2 3 Follow-up to the 64-bit build fix. Use intptr_t rather than ssize_t as 4 the latter is non-standard and does not exist on Windows. 5 6 * kjs/JSLock.cpp: 7 (KJS::JSLock::lockCount): 8 (KJS::JSLock::lock): 9 (KJS::JSLock::unlock): 10 (KJS::JSLock::DropAllLocks::DropAllLocks): 11 * kjs/JSLock.h: 12 1 13 2008-07-02 Mark Rowe <[email protected]> 2 14 -
trunk/JavaScriptCore/kjs/JSLock.cpp
r34990 r34991 49 49 50 50 // Lock nesting count. 51 ssize_t JSLock::lockCount()52 { 53 pthread_once(&createJSLockCountOnce, createJSLockCount); 54 55 return reinterpret_cast< ssize_t>(pthread_getspecific(JSLockCount));56 } 57 58 static void setLockCount( ssize_t count)51 intptr_t JSLock::lockCount() 52 { 53 pthread_once(&createJSLockCountOnce, createJSLockCount); 54 55 return reinterpret_cast<intptr_t>(pthread_getspecific(JSLockCount)); 56 } 57 58 static void setLockCount(intptr_t count) 59 59 { 60 60 ASSERT(count >= 0); … … 80 80 pthread_once(&createJSLockCountOnce, createJSLockCount); 81 81 82 ssize_t currentLockCount = lockCount();82 intptr_t currentLockCount = lockCount(); 83 83 if (!currentLockCount && lockForReal) { 84 84 int result; … … 99 99 #endif 100 100 101 ssize_t newLockCount = lockCount() - 1;101 intptr_t newLockCount = lockCount() - 1; 102 102 setLockCount(newLockCount); 103 103 if (!newLockCount && lockForReal) { … … 135 135 136 136 m_lockCount = JSLock::lockCount(); 137 for ( ssize_t i = 0; i < m_lockCount; i++)137 for (intptr_t i = 0; i < m_lockCount; i++) 138 138 JSLock::unlock(m_lockingForReal); 139 139 } … … 148 148 149 149 m_lockCount = JSLock::lockCount(); 150 for ( ssize_t i = 0; i < m_lockCount; i++)150 for (intptr_t i = 0; i < m_lockCount; i++) 151 151 JSLock::unlock(m_lockingForReal); 152 152 } … … 154 154 JSLock::DropAllLocks::~DropAllLocks() 155 155 { 156 for ( ssize_t i = 0; i < m_lockCount; i++)156 for (intptr_t i = 0; i < m_lockCount; i++) 157 157 JSLock::lock(m_lockingForReal); 158 158 } … … 167 167 // If threading support is off, set the lock count to a constant value of 1 so assertions 168 168 // that the lock is held don't fail 169 ssize_t JSLock::lockCount()169 intptr_t JSLock::lockCount() 170 170 { 171 171 return 1; -
trunk/JavaScriptCore/kjs/JSLock.h
r34990 r34991 85 85 static void unlock(ExecState*); 86 86 87 static ssize_t lockCount();87 static intptr_t lockCount(); 88 88 static bool currentThreadIsHoldingLock(); 89 89 … … 99 99 100 100 private: 101 ssize_t m_lockCount;101 intptr_t m_lockCount; 102 102 bool m_lockingForReal; 103 103 };
Note:
See TracChangeset
for help on using the changeset viewer.