Title: [206706] trunk/Source/WebCore
Revision
206706
Author
[email protected]
Date
2016-09-30 20:59:23 -0700 (Fri, 30 Sep 2016)

Log Message

REGRESSION (r203424): WebCore::ImageBuffer::createCompatibleBuffer() in ImageBufferCG.cpp over-releases CGColorSpaceRef objects
<https://webkit.org/b/162823>
<rdar://problem/27723268>

Reviewed by Joseph Pecoraro.

Code is covered by existing tests, but no crashes have been
observed in practice.  May require running one test multiple
times to reproduce.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer): Don't use
adoptCF() when the function doesn't return a +1 retained
CGColorSpaceRef.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (206705 => 206706)


--- trunk/Source/WebCore/ChangeLog	2016-10-01 03:49:15 UTC (rev 206705)
+++ trunk/Source/WebCore/ChangeLog	2016-10-01 03:59:23 UTC (rev 206706)
@@ -1,3 +1,20 @@
+2016-09-30  David Kilzer  <[email protected]>
+
+        REGRESSION (r203424): WebCore::ImageBuffer::createCompatibleBuffer() in ImageBufferCG.cpp over-releases CGColorSpaceRef objects
+        <https://webkit.org/b/162823>
+        <rdar://problem/27723268>
+
+        Reviewed by Joseph Pecoraro.
+
+        Code is covered by existing tests, but no crashes have been
+        observed in practice.  May require running one test multiple
+        times to reproduce.
+
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::createCompatibleBuffer): Don't use
+        adoptCF() when the function doesn't return a +1 retained
+        CGColorSpaceRef.
+
 2016-09-30  Joonghun Park  <[email protected]>
 
         [EFL] Fix build break since r206661. Unreviewed

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (206705 => 206706)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-10-01 03:49:15 UTC (rev 206705)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-10-01 03:59:23 UTC (rev 206706)
@@ -80,11 +80,11 @@
     CGContextRef cgContext = context.platformContext();
     switch (CGContextGetType(cgContext)) {
     case kCGContextTypeBitmap:
-        colorSpace = adoptCF(CGBitmapContextGetColorSpace(cgContext));
+        colorSpace = CGBitmapContextGetColorSpace(cgContext);
         break;
 #if USE(IOSURFACE)
     case kCGContextTypeIOSurface:
-        colorSpace = adoptCF(CGIOSurfaceContextGetColorSpace(cgContext));
+        colorSpace = CGIOSurfaceContextGetColorSpace(cgContext);
         break;
 #endif
     default:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to