[webkit-reviews] review denied: [Bug 123600] Remote Layer Tree: Vend layer contents via IOSurfaces : [Attachment 215697] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 31 17:47:22 PDT 2013


Anders Carlsson <andersca at apple.com> has denied Tim Horton
<thorton at apple.com>'s request for review:
Bug 123600: Remote Layer Tree: Vend layer contents via IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=123600

Attachment 215697: patch
https://bugs.webkit.org/attachment.cgi?id=215697&action=review

------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=215697&action=review


Looks like there’s a memory leak somewhere, so I’m going to r-.

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:182
> +    const void* keys[6];
> +    const void* values[6];
> +    keys[0] = kIOSurfaceWidth;
> +    values[0] = CFNumberCreate(0, kCFNumberIntType, &width);
> +    keys[1] = kIOSurfaceHeight;
> +    values[1] = CFNumberCreate(0, kCFNumberIntType, &height);
> +    keys[2] = kIOSurfacePixelFormat;
> +    values[2] = CFNumberCreate(0, kCFNumberIntType, &pixelFormat);
> +    keys[3] = kIOSurfaceBytesPerElement;
> +    values[3] = CFNumberCreate(0, kCFNumberIntType, &bytesPerElement);
> +    keys[4] = kIOSurfaceBytesPerRow;
> +    values[4] = CFNumberCreate(0, kCFNumberLongType, &bytesPerRow);
> +    keys[5] = kIOSurfaceAllocSize;
> +    values[5] = CFNumberCreate(0, kCFNumberLongType, &allocSize);
> +
> +    RetainPtr<CFDictionaryRef> dict = adoptCF(CFDictionaryCreate(0, keys,
values, 6, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
> +    for (unsigned i = 0; i < 6; i++)
> +	   CFRelease(values[i]);

This should use the Objective-C literal syntax.

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:207
> +	   m_frontBuffer = 0;
> +	   m_frontSurface = 0;

These should be nullptr.

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:321
> +    frontImage = 0;
> +    frontContext = 0;

Should be nullptr.


More information about the webkit-reviews mailing list