Closed
Bug 420777
Opened 16 years ago
Closed 16 years ago
Don't convert an icon when it's unnecessary
Categories
(Mozilla Labs :: Prism, defect)
Mozilla Labs
Prism
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: nossralf, Assigned: nossralf)
Details
Attachments
(1 file)
1.23 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
The current behavior of install-shortcut.js is to always create a native icon by converting the format using image-tools, even if the supplied icon has a mime type that matches the native one. Since getIcon() sets up a proper stream for all cases (favicon found, app bundle has icon, use default icon when first two fail), skipping the conversion when mime types match is easy. (As a side-effect, this fixes a really weird crasher for me, whereby Prism would crash if the default icon was used, due to some oddity with closing the output stream in ImageUtils.createNativeIcon. There are no guarantees that this will never happen even if this suggested fix is applied, but I still think the logic of only converting when there's a mime type mismatch motivates making this slight change.) [Note: I use hg diff which means apply with "patch -p1".]
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → nossralf
Assignee | ||
Updated•16 years ago
|
Attachment #307110 -
Flags: review?(mark.finkle)
Updated•16 years ago
|
Attachment #307110 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 1•16 years ago
|
||
I just noticed the line |var storageStream = ImageUtils.createStorageStream();| should probably be moved inside the if-clause as well.
Comment 2•16 years ago
|
||
Yes, that makes sense. Done. However, it won't hurt 0.9 to not have this part fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•