Skip to content
Permalink
Browse files
[BlackBerry] WebOverlay: check if platformContext is null
https://bugs.webkit.org/show_bug.cgi?id=114005

Patch by Anthony Scian <ascian@blackberry.com> on 2013-04-05
Reviewed by Carlos Garcia Campos.

RIM PR 256522
Internally reviewed by Mike Lattanzio.

The pointer returned by lockBufferDrawable can be null, so it
needs to be checked first before being used.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):

Canonical link: https://commits.webkit.org/132372@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
afs-bb authored and webkit-commit-queue committed Apr 5, 2013
1 parent c607e81 commit 07515dfd312881ebd849e687f54ed98c3cf13b9b
Showing 2 changed files with 24 additions and 0 deletions.
@@ -460,6 +460,10 @@ void WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded(LayerComposi

clearBuffer(textureContents, 0, 0, 0, 0);
PlatformGraphicsContext* platformContext = lockBufferDrawable(textureContents);
if (!platformContext) {
destroyBuffer(textureContents);
return;
}
double transform[] = {
1, 0,
0, 1,
@@ -476,6 +480,10 @@ void WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded(LayerComposi
return;

PlatformGraphicsContext* platformContext = BlackBerry::Platform::Graphics::lockBufferDrawable(textureContents);
if (!platformContext) {
destroyBuffer(textureContents);
return;
}

AffineTransform transform;
platformContext->getTransform(reinterpret_cast<double*>(&transform));
@@ -1,3 +1,19 @@
2013-04-05 Anthony Scian <ascian@blackberry.com>

[BlackBerry] WebOverlay: check if platformContext is null
https://bugs.webkit.org/show_bug.cgi?id=114005

Reviewed by Carlos Garcia Campos.

RIM PR 256522
Internally reviewed by Mike Lattanzio.

The pointer returned by lockBufferDrawable can be null, so it
needs to be checked first before being used.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):

2013-04-05 Benjamin Poulain <bpoulain@apple.com>

Remove WTFURL from WebKit

0 comments on commit 07515df

Please sign in to comment.