Changeset 216305 in webkit


Ignore:
Timestamp:
May 5, 2017 8:27:16 PM (7 years ago)
Author:
Said Abou-Hallawa
Message:

Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to change the BitImage destructor to avoid calling
ImageFrameCache::decodedSizeChanged() since it is not really needed.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::~BitmapImage):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r216303 r216305  
     12017-05-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
     4        https://bugs.webkit.org/show_bug.cgi?id=171736
     5
     6        Reviewed by Tim Horton.
     7
     8        Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
     9        --guard-malloc.
     10
     11        Because an image format is not supported, the ImageObserver of the Image
     12        is deleted then the Image itself is deleted. In BitmapImage destructor,
     13        we make a call which ends up accessing the deleted ImageObserver.
     14
     15        To fix this, we need to change the BitImage destructor to avoid calling
     16        ImageFrameCache::decodedSizeChanged() since it is not really needed.
     17
     18        * platform/graphics/BitmapImage.cpp:
     19        (WebCore::BitmapImage::~BitmapImage):
     20
    1212017-05-05  Timothy Horton  <timothy_horton@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/BitmapImage.cpp

    r216293 r216305  
    6262{
    6363    invalidatePlatformData();
    64     stopAnimation();
     64    clearTimer();
     65    m_source.stopAsyncDecodingQueue();
    6566}
    6667
Note: See TracChangeset for help on using the changeset viewer.