Closed Bug 569542 Opened 14 years ago Closed 14 years ago

App picker never uses bundle display name

Categories

(Core Graveyard :: File Handling, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b1

People

(Reporter: ThinkVision, Assigned: Gavin)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 ( .NET CLR 3.5.30729) XPCOMViewer/0.9.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 ( .NET CLR 3.5.30729) XPCOMViewer/0.9.2

While I review the code at http://mxr.mozilla.org/comm-1.9.2/source/mozilla/toolkit/components/apppicker/content/appPicker.js. See below code variable mistakes.
193 #ifdef XP_MACOSX
194     const nsILocalFileMac = Components.interfaces.nsILocalFileMac;
195     if (file instanceof nsILocalFileMac) {
196       try {
197         return lfm.bundleDisplayName;
198       } catch (e) {
199       }
200     }
201 #endif

Here "lfm" should be "file".

Reproducible: Always

Steps to Reproduce:
1.open websit http://mxr.mozilla.org/comm-1.9.2/source/mozilla/toolkit/components/apppicker/content/appPicker.js
2.see line between 193 and 201
3.find "lfm.bundleDisplayName", it should be file.bundleDisplayName.
Actual Results:  
lfm should be file.

Expected Results:  
lfm should be file.
Blocks: 348808
Flags: blocking1.9.0.19?
See Also: → 348808
Status: UNCONFIRMED → NEW
Component: General → File Handling
Ever confirmed: true
QA Contact: general → file.handling
Hardware: Other → x86
See Also: 348808
Summary: Code variable mistake in js file, blocking bug 348808 → App picker never uses bundle display name
Product: Firefox → Core
QA Contact: file.handling → file-handling
Flags: blocking1.9.0.19?
Attached patch patch (obsolete) — Splinter Review
Good catch! There are three copies of this function spread across the tree, and this bug was the result of a bad copy/paste from one to the other, I think. I don't see any reason why these need to be different, so this patch makes them all do the same thing. Ideally we'd just have one implementation called by the three current consumers, but I'm not sure exactly what the best place for it is.
Attachment #448801 - Flags: review?(neil)
Assignee: nobody → gavin.sharp
Attached patch patch updated to trunk (obsolete) — Splinter Review
Here's one that applies cleanly.
Attachment #448801 - Attachment is obsolete: true
Attachment #449615 - Flags: review?(neil)
Attachment #448801 - Flags: review?(neil)
Attachment #449615 - Attachment is obsolete: true
Attachment #449622 - Flags: review?(neil)
Attachment #449615 - Flags: review?(neil)
Comment on attachment 449622 [details] [diff] [review]
fix indentation, also fix applications.js

Well, the Windows app picker still works, but I'm not in a position to verify the fix to the bug per se.
Attachment #449622 - Flags: review?(neil) → review+
https://hg.mozilla.org/mozilla-central/rev/3bd6e0c3770e
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Blocks: 572454
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: