Closed Bug 808054 Opened 12 years ago Closed 11 years ago

Downloads Panel should never anchor to tabs toolbar

Categories

(Firefox :: Downloads Panel, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 21

People

(Reporter: mconley, Assigned: tallOwen)

Details

(Whiteboard: [good first bug][mentor=mconley][lang=js])

Attachments

(1 file)

We have some catch-all code that anchors the Downloads Panel to the tabs toolbar in the event that the downloads-indicator button cannot be found.

We shouldn't really reach that case, since the code that does the anchoring shouldn't execute if the indicator is not find-able.

So instead of anchoring to the tabs toolbar, we should perhaps dump out an error to the Error Console.
Thanks for filing! Adding the [good first bug] whiteboard tag that, as I
discovered while preparing the Development Workshop in Turin, actually may
intersect with the list of mentored bugs (not all mentored bugs are something
that can get fixed quickly).
Whiteboard: [mentor=mconley][lang=js] → [good first bug][mentor=mconley][lang=js]
Do you have a URL for an example?
I would like to work on this, is there somewhere I can see the bug in action?
I suggest you to use the needinfo flag to directly ask specific developers, we get lots of bugmails.
Flags: needinfo?(mconley)
(In reply to Casey Becking from comment #3)
> I would like to work on this, is there somewhere I can see the bug in action?

Hey Casey!

Actually, the code we're talking about here is difficult (if not impossible) to get to - so actually trying to *see* the bug is likely not worth your time.

Here's the relevant code:

http://mxr.mozilla.org/mozilla-central/source/browser/components/downloads/content/downloads.js#403

The "else" condition (lines 406-408) should really be un-reachable - however, in the event that we *do* get there, we'd like to print a message in the Error Console as opposed to anchoring to the Tabs Toolbar.

You can write a message to the Error Console like this:

Components.utils.reportError("This is my error message.");

Let me know if you have any questions,

-Mike
Flags: needinfo?(mconley)
Attached patch Patch v0.1Splinter Review
Assignee: nobody → owen
Status: NEW → ASSIGNED
Attachment #701950 - Flags: review?(mconley)
Comment on attachment 701950 [details] [diff] [review]
Patch v0.1

Looks good to me! Thanks Owen!
Attachment #701950 - Flags: review?(mconley) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/18316d354cad
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: