Changeset 147726 in webkit


Ignore:
Timestamp:
Apr 5, 2013 1:24:50 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[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):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebOverlay.cpp

    r146906 r147726  
    461461        clearBuffer(textureContents, 0, 0, 0, 0);
    462462        PlatformGraphicsContext* platformContext = lockBufferDrawable(textureContents);
     463        if (!platformContext) {
     464            destroyBuffer(textureContents);
     465            return;
     466        }
    463467        double transform[] = {
    464468            1, 0,
     
    477481
    478482        PlatformGraphicsContext* platformContext = BlackBerry::Platform::Graphics::lockBufferDrawable(textureContents);
     483        if (!platformContext) {
     484            destroyBuffer(textureContents);
     485            return;
     486        }
    479487
    480488        AffineTransform transform;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r147715 r147726  
     12013-04-05  Anthony Scian  <ascian@blackberry.com>
     2
     3        [BlackBerry] WebOverlay: check if platformContext is null
     4        https://bugs.webkit.org/show_bug.cgi?id=114005
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        RIM PR 256522
     9        Internally reviewed by Mike Lattanzio.
     10
     11        The pointer returned by lockBufferDrawable can be null, so it
     12        needs to be checked first before being used.
     13
     14        * Api/WebOverlay.cpp:
     15        (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
     16
    1172013-04-05  Benjamin Poulain  <bpoulain@apple.com>
    218
Note: See TracChangeset for help on using the changeset viewer.