Closed Bug 628470 Opened 13 years ago Closed 13 years ago

popup.xml#popup-base, hidePopup method throws exceptions for failed QI to nsIMenuBoxObject

Categories

(Toolkit :: UI Widgets, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b12

People

(Reporter: WeirdAl, Assigned: WeirdAl)

Details

Attachments

(1 file)

This is extremely annoying for Venkman users.  Can we switch to instanceof, already?
Assignee: nobody → ajvincent
Status: NEW → ASSIGNED
Attachment #506606 - Flags: review?(enndeakin)
Attachment #506606 - Flags: review?(enndeakin) → review+
Comment on attachment 506606 [details] [diff] [review]
switch to instanceof in showPopup, hidePopup

requesting approval for FF4:  Zero risk, and one less exception to be thrown and invisibly caught.
Attachment #506606 - Flags: approval2.0?
Attachment #506606 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
try {
  menuBox = this.parentNode.boxObject;
} catch(e) {}

When would this throw, i.e. why is the try/catch still needed?
(In reply to comment #3)
> try {
>   menuBox = this.parentNode.boxObject;
> } catch(e) {}
> 
> When would this throw, i.e. why is the try/catch still needed?

I don't know if it would ever throw.  To my knowledge, it's only the QI calls that were throwing.

That said, I don't think we want to take a bigger change than absolutely necessary at this late stage.  The way it's written, if it did throw, menuBox would be null, and (null instanceof Components.interfaces.nsIMenuBoxObject) is always false.
http://hg.mozilla.org/mozilla-central/rev/a3a568807d82
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: