Changeset 37771 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 21, 2008, 11:07:32 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r37763 r37771 1 2008-10-21 Alexey Proskuryakov <[email protected]> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=21769 6 MessagePort should be GC protected if there are messages to be delivered 7 8 * wtf/MessageQueue.h: 9 (WTF::::isEmpty): Added. Also added a warning for methods that return a snapshot of queue 10 state, thus likely to cause race conditions. 11 1 12 2008-10-21 Darin Adler <[email protected]> 2 13 -
trunk/JavaScriptCore/wtf/MessageQueue.h
r30811 r37771 45 45 void prepend(const DataType&); 46 46 bool waitForMessage(DataType&); 47 void kill(); 48 47 49 bool tryGetMessage(DataType&); 48 void kill();49 50 bool killed() const; 51 52 // The result of isEmpty() is only valid if no other thread is manipulating the queue at the same time. 53 bool isEmpty(); 50 54 51 55 private: … … 104 108 105 109 template<typename DataType> 110 inline bool MessageQueue<DataType>::isEmpty() 111 { 112 MutexLocker lock(m_mutex); 113 if (m_killed) 114 return true; 115 return m_queue.isEmpty(); 116 } 117 118 template<typename DataType> 106 119 inline void MessageQueue<DataType>::kill() 107 120 {
Note:
See TracChangeset
for help on using the changeset viewer.