Title: [143784] trunk/Source/WebCore
- Revision
- 143784
- Author
- r...@google.com
- Date
- 2013-02-22 13:30:51 -0800 (Fri, 22 Feb 2013)
Log Message
Check for null-device when calling createCompatibleDevice
https://bugs.webkit.org/show_bug.cgi?id=107981
Reviewed by James Robinson.
No new tests. Current tests provided coverage. Site in the wild triggered the failure
(cairo failed to allocate a huge surface).
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::ImageBuffer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (143783 => 143784)
--- trunk/Source/WebCore/ChangeLog 2013-02-22 21:24:22 UTC (rev 143783)
+++ trunk/Source/WebCore/ChangeLog 2013-02-22 21:30:51 UTC (rev 143784)
@@ -1,3 +1,16 @@
+2013-02-22 Mike Reed <r...@google.com>
+
+ Check for null-device when calling createCompatibleDevice
+ https://bugs.webkit.org/show_bug.cgi?id=107981
+
+ Reviewed by James Robinson.
+
+ No new tests. Current tests provided coverage. Site in the wild triggered the failure
+ (cairo failed to allocate a huge surface).
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::ImageBuffer):
+
2013-02-22 Chris Rogers <crog...@google.com>
AudioDestination::create() needs extra device identification information for live/local input streams
Modified: trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (143783 => 143784)
--- trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2013-02-22 21:24:22 UTC (rev 143783)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2013-02-22 21:30:51 UTC (rev 143784)
@@ -129,6 +129,11 @@
}
SkAutoTUnref<SkDevice> device(compatibleContext->platformContext()->createCompatibleDevice(size, hasAlpha));
+ if (!device.get()) {
+ success = false;
+ return;
+ }
+
SkPixelRef* pixelRef = device->accessBitmap(false).pixelRef();
if (!pixelRef) {
success = false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes