[webkit-reviews] review denied: [Bug 57717] Convert use of raw pointers to RefPtr in using Cairo : [Attachment 88212] Proposed Patch4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 5 08:34:23 PDT 2011


Martin Robinson <mrobinson at webkit.org> has denied Joone Hur <joone at kldp.org>'s
request for review:
Bug 57717: Convert use of raw pointers to RefPtr in using Cairo
https://bugs.webkit.org/show_bug.cgi?id=57717

Attachment 88212: Proposed Patch4
https://bugs.webkit.org/attachment.cgi?id=88212&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=88212&action=review

r- because of some minor style issues and a possible leak you might be able to
fix!

> Source/WebCore/platform/graphics/ContextShadow.h:38
> +#if PLATFORM(CAIRO)
> +#include "RefPtrCairo.h"
> +#endif
>  #include <wtf/RefCounted.h>

This should be in separate block.

> Source/WebCore/platform/graphics/ContextShadow.h:133
> +#if PLATFORM(CAIRO)
> +    RefPtr<cairo_surface_t> m_layerImage; // Buffer to where the temporary
shadow will be drawn to.
> +    RefPtr<cairo_t> m_layerContext; // Context used to paint the shadow to
the layer image.
> +#else

Why not use change the typedefs above instead of adding #ifdefs to the code?

> Source/WebCore/platform/graphics/cairo/CairoPath.h:35
>	   static cairo_surface_t* pathSurface =
cairo_image_surface_create(CAIRO_FORMAT_A8, 1, 1);
> -	   m_cr = cairo_create(pathSurface);
> +	   m_cr = adoptRef(cairo_create(pathSurface));

Looking at this now, isn't the surface leaked? It scould be a RefPtr here too.


More information about the webkit-reviews mailing list