Bug 122115 - Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded raw data.
Summary: Don't attempt to destroy decoded frame if a BitmapImage doesn't have encoded ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-30 12:01 PDT by Yongjun Zhang
Modified: 2013-09-30 14:53 PDT (History)
5 users (show)

See Also:


Attachments
Patch. (1.97 KB, patch)
2013-09-30 12:32 PDT, Yongjun Zhang
dbates: review+
Details | Formatted Diff | Diff
Address review comments. (2.00 KB, patch)
2013-09-30 14:00 PDT, Yongjun Zhang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.