Skip to content
Permalink
Browse files
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 <junov@chromium.org> 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 <junov@chromium.org> on 2011-08-22
Reviewed by Stephen White.

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

Canonical link: https://commits.webkit.org/82494@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
junov authored and webkit-commit-queue committed Aug 22, 2011
1 parent 19b5522 commit f2cc3b5076aa7c73301918678245cfa33003900f
Showing 4 changed files with 29 additions and 2 deletions.
@@ -1,3 +1,19 @@
2011-08-22 Justin Novosad <junov@chromium.org>

[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 <loislo@chromium.org>

Web Inspector: bind registerDomainDispatcher to domain names.
@@ -67,7 +67,7 @@ ImageBuffer::ImageBuffer(const IntSize& size, ColorSpace, RenderingMode renderin
, 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;
@@ -1,3 +1,14 @@
2011-08-22 Justin Novosad <junov@chromium.org>

[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 <cira@chromium.org>

Add dependency on v8-i18n library. We used v8 repository before.
@@ -32,7 +32,7 @@

vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
'chromium_rev': '96940'
'chromium_rev': '97474'
}

deps = {

0 comments on commit f2cc3b5

Please sign in to comment.