[GTK] WebKitTestRunner tries to remove an already deleted event in EventSenderProxy...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jul 2013 08:41:14 +0000 (08:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jul 2013 08:41:14 +0000 (08:41 +0000)
commit45badb418c35a86dddf93fff0203fda0034ac5dc
tree988880a8c662d4ef8ee843ac5599c2c757b8811f
parent1629cc16cf1ddc28fd7ea07d1c6ae078145eb7f1
[GTK] WebKitTestRunner tries to remove an already deleted event in EventSenderProxy::replaySavedEvents
https://bugs.webkit.org/show_bug.cgi?id=118509

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-10
Reviewed by Martin Robinson.

In EventSenderProxy::replaySavedEvents WebKitTestRunner can crash
when trying to remove an event already removed, if another event is
processed in the middle. By using a Deque's takeFirst, we ensure the
element is removed before we dispatch it.

fast/events/mousedown-inside-dragstart-should-not-cause-crash.html no longer
crashes after this fix is added.

* WebKitTestRunner/EventSenderProxy.h: Use a Deque instead of Vector in GTK
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::replaySavedEvents): Use takeFirst to retrieve the event
from the queue.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebKitTestRunner/EventSenderProxy.h
Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp