Changeset 80054 in webkit
- Timestamp:
- Mar 1, 2011 3:54:02 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80049 r80054 1 2011-03-01 Jeremy Orlow <jorlow@chromium.org> 2 3 Reviewed by Mihai Parparita. 4 5 EventQueue needs to be ref counted 6 https://bugs.webkit.org/show_bug.cgi?id=55512 7 8 EventQueue needs to be ref counted because it's possible for its instance 9 to be deleted while it's dispatching events. This is the reason why 10 https://bugs.webkit.org/show_bug.cgi?id=54785 had to be reverted. 11 12 No change of behavior, so no tests. 13 14 * dom/Document.h: 15 * dom/EventQueue.cpp: 16 (WebCore::EventQueue::create): 17 * dom/EventQueue.h: 18 1 19 2011-03-01 Helder Correia <helder@sencha.com> 2 20 -
trunk/Source/WebCore/dom/Document.h
r80030 r80054 1394 1394 bool m_usingGeolocation; 1395 1395 1396 OwnPtr<EventQueue> m_eventQueue;1396 RefPtr<EventQueue> m_eventQueue; 1397 1397 1398 1398 #if ENABLE(WML) -
trunk/Source/WebCore/dom/EventQueue.cpp
r80038 r80054 48 48 }; 49 49 50 PassRefPtr<EventQueue> EventQueue::create(ScriptExecutionContext* context) 51 { 52 return adoptRef(new EventQueue(context)); 53 } 54 50 55 EventQueue::EventQueue(ScriptExecutionContext* context) 51 56 : m_pendingEventTimer(adoptPtr(new EventQueueTimer(this, context))) … … 87 92 m_nodesWithQueuedScrollEvents.clear(); 88 93 94 RefPtr<EventQueue> protector(this); 95 89 96 for (size_t i = 0; i < queuedEvents.size(); i++) 90 97 dispatchEvent(queuedEvents[i].release()); -
trunk/Source/WebCore/dom/EventQueue.h
r80038 r80054 29 29 30 30 #include <wtf/HashSet.h> 31 #include <wtf/Noncopyable.h>32 31 #include <wtf/OwnPtr.h> 33 #include <wtf/ PassOwnPtr.h>32 #include <wtf/RefCounted.h> 34 33 #include <wtf/RefPtr.h> 35 34 #include <wtf/Vector.h> … … 42 41 class ScriptExecutionContext; 43 42 44 class EventQueue { 45 WTF_MAKE_NONCOPYABLE(EventQueue); 46 47 43 class EventQueue : public RefCounted<EventQueue> { 48 44 public: 49 45 enum ScrollEventTargetType { … … 52 48 }; 53 49 54 static PassOwnPtr<EventQueue> create(ScriptExecutionContext* context) 55 { 56 return adoptPtr(new EventQueue(context)); 57 } 58 50 static PassRefPtr<EventQueue> create(ScriptExecutionContext*); 59 51 ~EventQueue(); 60 52
Note: See TracChangeset
for help on using the changeset viewer.