Changeset 163103 in webkit


Ignore:
Timestamp:
Jan 30, 2014 12:57:32 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Crash in RemoteLayerBackingStore::encode when m_frontBuffer is nullptr.
https://bugs.webkit.org/show_bug.cgi?id=127756

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-01-30
Reviewed by Jer Noble.

Don't encode RemoteLayerBackingStore when it has no front buffer.

  • Shared/mac/RemoteLayerBackingStore.h:

(WebKit::RemoteLayerBackingStore::hasFrontBuffer):

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r163099 r163103  
     12014-01-30  Jeremy Jones  <jeremyj@apple.com>
     2
     3        Crash in RemoteLayerBackingStore::encode when m_frontBuffer is nullptr.
     4        https://bugs.webkit.org/show_bug.cgi?id=127756
     5
     6        Reviewed by Jer Noble.
     7
     8        Don't encode RemoteLayerBackingStore when it has no front buffer.
     9
     10        * Shared/mac/RemoteLayerBackingStore.h:
     11        (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
     12        * Shared/mac/RemoteLayerTreeTransaction.mm:
     13        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
     14        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
     15
    1162014-01-30  Mark Rowe  <mrowe@apple.com>
    217
  • trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h

    r163079 r163103  
    7070    void enumerateRectsBeingDrawn(CGContextRef, void (^)(CGRect));
    7171
    72 private:
    73     bool hasFrontBuffer()
     72    bool hasFrontBuffer() const
    7473    {
    7574#if USE(IOSURFACE)
     
    7978        return !!m_frontBuffer;
    8079    }
     80private:
    8181
    8282    void drawInContext(WebCore::GraphicsContext&, CGImageRef frontImage);
  • trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm

    r162644 r163103  
    168168        encoder << timeOffset;
    169169
    170     if (changedProperties & BackingStoreChanged)
    171         encoder << backingStore;
     170    if (changedProperties & BackingStoreChanged) {
     171        encoder << backingStore.hasFrontBuffer();
     172        if (backingStore.hasFrontBuffer())
     173            encoder << backingStore;
     174    }
    172175
    173176    if (changedProperties & FiltersChanged)
     
    307310
    308311    if (result.changedProperties & BackingStoreChanged) {
    309         if (!decoder.decode(result.backingStore))
     312        bool hasFrontBuffer = false;
     313        if (!decoder.decode(hasFrontBuffer))
     314            return false;
     315        if (hasFrontBuffer && !decoder.decode(result.backingStore))
    310316            return false;
    311317    }
Note: See TracChangeset for help on using the changeset viewer.