Bug 122115

Summary: Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded raw data.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, ddkilzer, koivisto, yongjun_zhang
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Attachments:
Description Flags
Patch.
dbates: review+
Address review comments. none

Description Yongjun Zhang 2013-09-30 12:01:25 PDT
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.
Comment 1 Yongjun Zhang 2013-09-30 12:32:29 PDT
Created attachment 213021 [details]
Patch.
Comment 2 Daniel Bates 2013-09-30 13:47:23 PDT
Comment on attachment 213021 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=213021&action=review

> Source/WebCore/ChangeLog:7
> +        passing a native image.  If this image is added to memory cache, we shouldn't attempt to destroy

Nit: "added to memory cache" => "added to the memory cache"

> Source/WebCore/ChangeLog:10
> +        Reviewed by NOBODY (OOPS!).

Nit: This line should come after the bug URL.

> Source/WebCore/ChangeLog:13
> +        No new tests for now. Currently there is no code patch to add an BitmapImage created by native image
> +        to memory cache, we will add this in future.

The second sentence doesn't read well. Maybe:

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.
Comment 3 Yongjun Zhang 2013-09-30 14:00:31 PDT
Created attachment 213034 [details]
Address review comments.
Comment 4 WebKit Commit Bot 2013-09-30 14:53:01 PDT
Comment on attachment 213034 [details]
Address review comments.

Clearing flags on attachment: 213034

Committed r156681: <http://trac.webkit.org/changeset/156681>
Comment 5 WebKit Commit Bot 2013-09-30 14:53:03 PDT
All reviewed patches have been landed.  Closing bug.