Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose

https://bugs.webkit.org/show_bug.cgi?id=123252

Patch by Zan Dobersek <zdobersek@igalia.com> on 2013-10-24
Reviewed by Darin Adler.

Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to
the calling convention in C++ is left unspecified. The problem was already fixed in r157219
and later adjusted in r157401, but the comment could have been shorter and simpler in both cases.

* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b1ea3eac
2013-10-24 Zan Dobersek <zdobersek@igalia.com>
Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose
https://bugs.webkit.org/show_bug.cgi?id=123252
Reviewed by Darin Adler.
Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to
the calling convention in C++ is left unspecified. The problem was already fixed in r157219
and later adjusted in r157401, but the comment could have been shorter and simpler in both cases.
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent):
2013-10-24 Alex Christensen <achristensen@webkit.org>
Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files.
......
......@@ -79,9 +79,7 @@ void ScopedEventQueue::dispatchAllEvents()
void ScopedEventQueue::dispatchEvent(PassRefPtr<Event> event) const
{
ASSERT(event->target());
// Passing the PassRefPtr<Event> object into the method call creates a new copy and also nullifies
// the original object, which is causing crashes in GCC-compiled code that only after that goes on
// to retrieve the Event's target, calling Event::target() on the now-null PassRefPtr<Event> object.
// Store the target in a local variable to avoid possibly dereferencing a nullified PassRefPtr after it's passed on.
Node* node = event->target()->toNode();
EventDispatcher::dispatchEvent(node, event);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment