Bug 115759 - Move CanvasGradient and CanvasPattern in the union of CanvasStyle
Summary: Move CanvasGradient and CanvasPattern in the union of CanvasStyle
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-07 14:17 PDT by Benjamin Poulain
Modified: 2013-05-07 18:42 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.21 KB, patch)
2013-05-07 14:18 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2013-05-07 14:17:20 PDT
Move CanvasGradient and CanvasPattern in the union of CanvasStyle
Comment 1 Benjamin Poulain 2013-05-07 14:18:46 PDT
Created attachment 200975 [details]
Patch
Comment 2 Benjamin Poulain 2013-05-07 15:13:12 PDT
Comment on attachment 200975 [details]
Patch

Clearing flags on attachment: 200975

Committed r149696: <http://trac.webkit.org/changeset/149696>
Comment 3 Benjamin Poulain 2013-05-07 15:13:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2013-05-07 18:31:48 PDT
Comment on attachment 200975 [details]
Patch

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

> Source/WebCore/html/canvas/CanvasStyle.cpp:130
> -    , m_gradient(gradient)
> +    , m_gradient(gradient.leakRef())
>  {
> +    m_gradient->ref();

This looks like a storage leak to me. We already have a ref because of the call to leakRef, no need to call ref again.

> Source/WebCore/html/canvas/CanvasStyle.cpp:137
> -    , m_pattern(pattern)
> +    , m_pattern(pattern.leakRef())
>  {
> +    m_pattern->ref();

Ditto. Am I right?
Comment 5 Benjamin Poulain 2013-05-07 18:42:51 PDT
Damn! That is right.

Follow up: http://trac.webkit.org/changeset/149706