RESOLVED FIXED 122592
REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platforms using GCC
https://bugs.webkit.org/show_bug.cgi?id=122592
Summary REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for ...
Zan Dobersek
Reported 2013-10-10 03:05:09 PDT
REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platforms using GCC
Attachments
Patch (2.12 KB, patch)
2013-10-10 03:17 PDT, Zan Dobersek
no flags
Patch (2.23 KB, patch)
2013-10-10 05:39 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2013-10-10 03:17:23 PDT
Sergio Villar Senin
Comment 2 2013-10-10 03:35:05 PDT
Comment on attachment 213863 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213863&action=review > Source/WebCore/ChangeLog:18 > + Looks like something wrong happened here :) > Source/WebCore/dom/ScopedEventQueue.cpp:83 > + EventDispatcher::dispatchEvent(node, event); I think this deserves a comment, because it isn't obvious why we're assigning the pointer first to a local variable. Or even better, we can assign the event to a local RefPtr and use that in dispatchEvent()
Zan Dobersek
Comment 3 2013-10-10 03:50:30 PDT
Comment on attachment 213863 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213863&action=review >> Source/WebCore/dom/ScopedEventQueue.cpp:83 >> + EventDispatcher::dispatchEvent(node, event); > > I think this deserves a comment, because it isn't obvious why we're assigning the pointer first to a local variable. > > Or even better, we can assign the event to a local RefPtr and use that in dispatchEvent() How about passing in a naked pointer of the event? This won't destruct the original PassRefPtr. I'm missing support for something like std::forward() here.
Alberto Garcia
Comment 4 2013-10-10 05:35:44 PDT
(In reply to comment #3) > How about passing in a naked pointer of the event? This won't > destruct the original PassRefPtr. I think it's unclear either way and deserves a comment.
Zan Dobersek
Comment 5 2013-10-10 05:39:47 PDT
Zan Dobersek
Comment 6 2013-10-10 06:28:21 PDT
Comment on attachment 213875 [details] Patch Clearing flags on attachment: 213875 Committed r157219: <http://trac.webkit.org/changeset/157219>
Zan Dobersek
Comment 7 2013-10-10 06:28:27 PDT
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 8 2013-10-10 09:46:23 PDT
I think that the original proposed patch was better, because it avoided reference churn from creating a new PassRefPtr.
Alberto Garcia
Comment 9 2013-10-10 11:58:01 PDT
(In reply to comment #8) > I think that the original proposed patch was better, because it > avoided reference churn from creating a new PassRefPtr. I also think that it was a bit clearer, the .get() solution makes the reader wonder what's going on there, while the original one feels natural.
Zan Dobersek
Comment 10 2013-10-10 13:45:51 PDT
I'm indifferent here, but I'll upload the adjustment in a separate bug.
Zan Dobersek
Comment 11 2013-10-14 02:11:16 PDT
(In reply to comment #10) > I'm indifferent here, but I'll upload the adjustment in a separate bug. Bug #122742.
Note You need to log in before you can comment on or make changes to this bug.