Bug 117031

Summary: Fix double hash lookup in DocumentEventQueue::cancelEvent().
Product: WebKit Reporter: Andreas Kling <kling>
Component: UI EventsAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, esprehn+autocc, kling
Priority: P2 Keywords: Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Andreas Kling
Reported 2013-05-30 08:13:27 PDT
Fix double hash lookup in DocumentEventQueue::cancelEvent().
Attachments
Patch (1.32 KB, patch)
2013-05-30 08:15 PDT, Andreas Kling
andersca: review+
Andreas Kling
Comment 1 2013-05-30 08:15:00 PDT
Anders Carlsson
Comment 2 2013-05-30 08:39:38 PDT
Comment on attachment 203358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=203358&action=review > Source/WebCore/dom/DocumentEventQueue.cpp:103 > + m_queuedEvents.remove(it); You only want to remove it if it's found.
Andreas Kling
Comment 3 2013-05-30 08:40:46 PDT
(In reply to comment #2) > (From update of attachment 203358 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=203358&action=review > > > Source/WebCore/dom/DocumentEventQueue.cpp:103 > > + m_queuedEvents.remove(it); > > You only want to remove it if it's found. THE SHAME :(
Andreas Kling
Comment 4 2013-05-30 10:09:08 PDT
Darin Adler
Comment 5 2013-05-30 10:16:09 PDT
I think we should add a bool return value to remove so we don’t have to use iterators in all the cases like this.
Note You need to log in before you can comment on or make changes to this bug.