Title: [157933] trunk/Source/WebCore
Revision
157933
Author
[email protected]
Date
2013-10-24 09:22:53 -0700 (Thu, 24 Oct 2013)

Log Message

Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose
https://bugs.webkit.org/show_bug.cgi?id=123252

Patch by Zan Dobersek <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157932 => 157933)


--- trunk/Source/WebCore/ChangeLog	2013-10-24 16:10:59 UTC (rev 157932)
+++ trunk/Source/WebCore/ChangeLog	2013-10-24 16:22:53 UTC (rev 157933)
@@ -1,3 +1,17 @@
+2013-10-24  Zan Dobersek  <[email protected]>
+
+        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  <[email protected]>
 
         Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files.

Modified: trunk/Source/WebCore/dom/ScopedEventQueue.cpp (157932 => 157933)


--- trunk/Source/WebCore/dom/ScopedEventQueue.cpp	2013-10-24 16:10:59 UTC (rev 157932)
+++ trunk/Source/WebCore/dom/ScopedEventQueue.cpp	2013-10-24 16:22:53 UTC (rev 157933)
@@ -79,9 +79,7 @@
 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);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to