Bug 86497 - SVGElement::addEventListener has peculiar RefPtr usage
Summary: SVGElement::addEventListener has peculiar RefPtr usage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-15 10:31 PDT by Darin Adler
Modified: 2012-05-24 11:02 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.50 KB, patch)
2012-05-15 10:32 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (2.79 KB, patch)
2012-05-22 22:27 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2012-05-15 10:31:15 PDT
SVGElement::addEventListener has peculiar RefPtr usage
Comment 1 Darin Adler 2012-05-15 10:32:01 PDT
Created attachment 141996 [details]
Patch
Comment 2 Build Bot 2012-05-15 10:41:29 PDT
Comment on attachment 141996 [details]
Patch

Attachment 141996 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12684878
Comment 3 Andy Estes 2012-05-15 10:44:55 PDT
Comment on attachment 141996 [details]
Patch

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

> Source/WebCore/svg/SVGElement.cpp:371
>          return Node::addEventListener(eventType, listener, useCapture);

As the EFL bot says, listener is used here

> Source/WebCore/svg/SVGElement.cpp:373
> +    RefPtr<EventListener> listener = prpListener;

...but isn't declared until here.
Comment 4 Andy Estes 2012-05-15 10:45:09 PDT
EWS, not EFL
Comment 5 Darin Adler 2012-05-15 13:01:51 PDT
Comment on attachment 141996 [details]
Patch

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

>> Source/WebCore/svg/SVGElement.cpp:373
>> +    RefPtr<EventListener> listener = prpListener;
> 
> ...but isn't declared until here.

Oops. Just need to move that up a few lines and say listener.release(). I’ll do that next time I’m at a computer with a source tree.
Comment 6 Darin Adler 2012-05-22 22:27:27 PDT
Created attachment 143462 [details]
Patch
Comment 7 WebKit Review Bot 2012-05-24 11:02:39 PDT
Comment on attachment 143462 [details]
Patch

Clearing flags on attachment: 143462

Committed r118393: <http://trac.webkit.org/changeset/118393>
Comment 8 WebKit Review Bot 2012-05-24 11:02:44 PDT
All reviewed patches have been landed.  Closing bug.