Bug 115759

Summary: Move CanvasGradient and CanvasPattern in the union of CanvasStyle
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: CanvasAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, esprehn+autocc
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

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