Skip to content
  • aestes@apple.com's avatar
    Reference count WebView's backing store bitmap to prevent · e1a995c1
    aestes@apple.com authored
    deleteBackingStore() from freeing the bitmap while it is still being
    referenced by Core Animation.
    
    Reviewed by Maciej Stachowiak.
    
    https://bugs.webkit.org/show_bug.cgi?id=37954
    
    * WebView.cpp:
    (WebView::ensureBackingStore):
    (WebView::addToDirtyRegion):
    (WebView::scrollBackingStore):
    (WebView::updateBackingStore):
    (WebView::paint):
    (WebView::backingStore):
    (releaseBackingStoreCallback): deref m_backingStoreBitmap once Core
    Animation has dropeed its reference to the memory.
    (WebView::updateRootLayerContents): ref m_backingStoreBitmap before
    passing the memory to Core Animation to prevent deleteBackingStore()
    from freeing it while it is still referenced by CA.
    * WebView.h: Make m_backingStoreBitmap a RefCountedGDIHandle<HBITMAP>,
    and make m_backingStoreDirtyRegion a RefCountedGDIHandle<HRGN>.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e1a995c1