Changeset 74303 in webkit
- Timestamp:
- Dec 17, 2010 5:07:25 PM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r74300 r74303 1 2010-12-17 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Resizing a WKView while loading a page can leave the page at a size that doesn't match the window 6 https://bugs.webkit.org/show_bug.cgi?id=51282 7 <rdar://problem/8133142> 8 9 Fix a race condition in waitForMessage. If we time out on the wait condition, we would keep the 10 m_waitForMessageMutex mutex unlocked for a brief period of time before taking the lock again and 11 then removing the messageID/destinationID pair from the hash map. Under some circumstances, the 12 connection queue would update the hash map right before we removed it, leading to a lost message. 13 14 * Platform/CoreIPC/Connection.cpp: 15 (CoreIPC::Connection::waitForMessage): 16 1 17 2010-12-17 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/WebKit2/Platform/CoreIPC/Connection.cpp
r71931 r74303 141 141 } 142 142 143 bool timedOut = false;144 145 143 // Now wait for it to be set. 146 while ( !timedOut) {144 while (true) { 147 145 MutexLocker locker(m_waitForMessageMutex); 148 146 … … 155 153 } 156 154 157 // We didn't find it, keep waiting. 158 timedOut = !m_waitForMessageCondition.timedWait(m_waitForMessageMutex, absoluteTime); 159 } 160 161 // We timed out, now remove the pending wait. 162 { 163 MutexLocker locker(m_waitForMessageMutex); 164 m_waitForMessageMap.remove(messageAndDestination); 155 // Now we wait. 156 if (!m_waitForMessageCondition.timedWait(m_waitForMessageMutex, absoluteTime)) { 157 // We timed out, now remove the pending wait. 158 m_waitForMessageMap.remove(messageAndDestination); 159 160 break; 161 } 165 162 } 166 163
Note: See TracChangeset
for help on using the changeset viewer.