Index: Source/WebCore/workers/WorkerEventQueue.cpp |
=================================================================== |
--- Source/WebCore/workers/WorkerEventQueue.cpp (revision 115613) |
+++ Source/WebCore/workers/WorkerEventQueue.cpp (working copy) |
@@ -58,6 +58,12 @@ |
return adoptPtr(new EventDispatcherTask(event, eventQueue)); |
} |
+ virtual ~EventDispatcherTask() |
+ { |
+ if (m_event) |
+ m_eventQueue->removeEvent(m_event.get()); |
+ } |
+ |
void dispatchEvent(ScriptExecutionContext*, PassRefPtr<Event> event) |
{ |
event->target()->dispatchEvent(event); |
@@ -69,6 +75,7 @@ |
return; |
m_eventQueue->removeEvent(m_event.get()); |
dispatchEvent(context, m_event); |
+ m_event.clear(); |
} |
void cancel() |