Title: [93512] trunk/Source
Revision
93512
Author
[email protected]
Date
2011-08-22 09:02:11 -0700 (Mon, 22 Aug 2011)

Log Message

Source/WebCore: [Chromium] Crash when allocation of very large canvas fails
https://bugs.webkit.org/show_bug.cgi?id=66563
Replacing the crash with a more graceful failure: canvas
will not render.

Patch by Justin Novosad <[email protected]> on 2011-08-22
Reviewed by Stephen White.

* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::ImageBuffer):
Invoking TryCreateBitmapCanvas instead of CreateBitmapCanvas
This is the non-crashing version of the factory function.
It returns NULL if allocation fails.  Code for handling
NULL pointer was already in place.

Source/WebKit/chromium: [Chromium] Crash when allocation of very large canvas fails
https://bugs.webkit.org/show_bug.cgi?id=66563

Patch by Justin Novosad <[email protected]> on 2011-08-22
Reviewed by Stephen White.

* DEPS:
Bumping up the chrome DEPS to pick up 97474, which is
required by this patch.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (93511 => 93512)


--- trunk/Source/WebCore/ChangeLog	2011-08-22 15:52:12 UTC (rev 93511)
+++ trunk/Source/WebCore/ChangeLog	2011-08-22 16:02:11 UTC (rev 93512)
@@ -1,3 +1,19 @@
+2011-08-22  Justin Novosad  <[email protected]>
+
+        [Chromium] Crash when allocation of very large canvas fails
+        https://bugs.webkit.org/show_bug.cgi?id=66563
+        Replacing the crash with a more graceful failure: canvas
+        will not render.
+
+        Reviewed by Stephen White.
+
+        * platform/graphics/skia/ImageBufferSkia.cpp:
+        (WebCore::ImageBuffer::ImageBuffer):
+        Invoking TryCreateBitmapCanvas instead of CreateBitmapCanvas
+        This is the non-crashing version of the factory function.
+        It returns NULL if allocation fails.  Code for handling
+        NULL pointer was already in place.
+
 2011-08-22  Ilya Tikhonovsky  <[email protected]>
 
         Web Inspector: bind registerDomainDispatcher to domain names.

Modified: trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (93511 => 93512)


--- trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp	2011-08-22 15:52:12 UTC (rev 93511)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp	2011-08-22 16:02:11 UTC (rev 93512)
@@ -67,7 +67,7 @@
     , m_size(size)
     , m_accelerateRendering(false)
 {
-    OwnPtr<SkCanvas> canvas = adoptPtr(skia::CreateBitmapCanvas(size.width(), size.height(), false));
+    OwnPtr<SkCanvas> canvas = adoptPtr(skia::TryCreateBitmapCanvas(size.width(), size.height(), false));
     if (!canvas) {
         success = false;
         return;

Modified: trunk/Source/WebKit/chromium/ChangeLog (93511 => 93512)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-08-22 15:52:12 UTC (rev 93511)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-08-22 16:02:11 UTC (rev 93512)
@@ -1,3 +1,14 @@
+2011-08-22  Justin Novosad  <[email protected]>
+
+        [Chromium] Crash when allocation of very large canvas fails
+        https://bugs.webkit.org/show_bug.cgi?id=66563
+
+        Reviewed by Stephen White.
+
+        * DEPS:
+        Bumping up the chrome DEPS to pick up 97474, which is
+        required by this patch.
+
 2011-08-20  Nebojsa Ciric  <[email protected]>
 
         Add dependency on v8-i18n library. We used v8 repository before.

Modified: trunk/Source/WebKit/chromium/DEPS (93511 => 93512)


--- trunk/Source/WebKit/chromium/DEPS	2011-08-22 15:52:12 UTC (rev 93511)
+++ trunk/Source/WebKit/chromium/DEPS	2011-08-22 16:02:11 UTC (rev 93512)
@@ -32,7 +32,7 @@
 
 vars = {
   'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
-  'chromium_rev': '96940'
+  'chromium_rev': '97474'
 }
 
 deps = {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to