Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded raw data.
https://bugs.webkit.org/show_bug.cgi?id=122115 Patch by Yongjun Zhang <firstname.lastname@example.org> on 2013-09-30 Reviewed by Daniel Bates. With BitmapImage::create(PassNativeImagePtr, ImageObserver*), a BitmapImage could be created by passing a native image. If this image is added to memory cache, we shouldn't attempt to destroy its decoded frames since there is no encoded raw data and we won't be able to reconstruct the image again. No new tests for now. Currently there isn't a code path to add to the memory cache a BitmapImage that was created by adopting a native image. We'll add such a code path in a subsequent patch. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedDataIfNecessary): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Showing with 23 additions and 0 deletions