Bug 55512 - EventQueue needs to be ref counted
Summary: EventQueue needs to be ref counted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 14:57 PST by Jeremy Orlow
Modified: 2011-03-01 16:18 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.29 KB, patch)
2011-03-01 15:00 PST, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch (3.28 KB, patch)
2011-03-01 15:49 PST, Jeremy Orlow
mihai: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2011-03-01 14:57:37 PST
EventQueue needs to be ref counted
Comment 1 Jeremy Orlow 2011-03-01 15:00:58 PST
Created attachment 84302 [details]
Patch
Comment 2 Jeremy Orlow 2011-03-01 15:01:10 PST
Please review.
Comment 3 Mihai Parparita 2011-03-01 15:35:05 PST
Comment on attachment 84302 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=84302&action=review

> Source/WebCore/dom/EventQueue.cpp:94
> +    RefPtr<EventQueue> m_keepAliveDuringIteration = this;

RefPtr<EventQueue> protector(this) is a more common pattern for this:
https://www.google.com/codesearch?as_q=refptr.*protector&vert=chromium

Either way the name shouldn't start with m_ since it's not a member.
Comment 4 Jeremy Orlow 2011-03-01 15:49:24 PST
(In reply to comment #3)
> (From update of attachment 84302 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=84302&action=review
> 
> > Source/WebCore/dom/EventQueue.cpp:94
> > +    RefPtr<EventQueue> m_keepAliveDuringIteration = this;
> 
> RefPtr<EventQueue> protector(this) is a more common pattern for this:
> https://www.google.com/codesearch?as_q=refptr.*protector&vert=chromium
> 
> Either way the name shouldn't start with m_ since it's not a member.

Oops...fixed.
Comment 5 Jeremy Orlow 2011-03-01 15:49:46 PST
Created attachment 84313 [details]
Patch
Comment 6 Jeremy Orlow 2011-03-01 15:54:15 PST
Committed r80054: <http://trac.webkit.org/changeset/80054>
Comment 7 WebKit Review Bot 2011-03-01 16:18:04 PST
http://trac.webkit.org/changeset/80054 might have broken Chromium Win Release