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.

git-svn-id: svn://svn.chromium.org/blink/trunk@93512 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2faecf39
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;
......
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 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment