Closed
Bug 363032
Opened 18 years ago
Closed 18 years ago
###!!! ASSERTION: invalid arg: 'aIndex >= 0', file m:/trunk/mozilla/layout/generic/nsFrameList.cpp, line 300
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: WeirdAl, Assigned: WeirdAl)
References
Details
(Keywords: assertion, testcase)
Attachments
(2 files)
17.22 KB,
text/plain
|
Details | |
1.61 KB,
patch
|
enndeakin
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
If a XUL deck's selectedIndex is set to -1, Gecko triggers this assertion.
Stack trace coming up. This should be pretty easy to fix.
Assignee | ||
Updated•18 years ago
|
Assignee | ||
Comment 1•18 years ago
|
||
The JavaScript portion of this stack trace shows a binding setting a deck's selectedIndex to -1. Abusing the deck, maybe, but given how selectedIndex typically works, not entirely unreasonable.
Assignee | ||
Comment 2•18 years ago
|
||
Assignee: nobody → ajvincent
Status: NEW → ASSIGNED
Attachment #247779 -
Flags: superreview?(bzbarsky)
Attachment #247779 -
Flags: review?(bzbarsky)
Comment 3•18 years ago
|
||
I'm swamped. Please ask someone else for review on this. One of the XUL peers (Neils) might be a good idea.
Assignee | ||
Comment 4•18 years ago
|
||
Comment on attachment 247779 [details] [diff] [review]
patch, v1
trivial patch
Attachment #247779 -
Flags: superreview?(neil)
Attachment #247779 -
Flags: superreview?(bzbarsky)
Attachment #247779 -
Flags: review?(neil)
Attachment #247779 -
Flags: review?(bzbarsky)
Comment 5•18 years ago
|
||
Comment on attachment 247779 [details] [diff] [review]
patch, v1
Two Neils are better than one ;-)
One idea I had was that GetSelectedBox should use mIndex, while IndexChanged should set mIndex in between HideBox and ShowBox and call GetSelectedBox instead of GetBoxAt.
The other idea I had was that GetSelectedIndex should return 0 or perhaps MAXINT for negative indices.
Attachment #247779 -
Flags: review?(neil) → review?(enndeakin)
Comment 6•18 years ago
|
||
Comment on attachment 247779 [details] [diff] [review]
patch, v1
Look's OK. Neil's first suggestion seems good too.
Attachment #247779 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 7•18 years ago
|
||
(In reply to comment #5)
> The other idea I had was that GetSelectedIndex should return 0 or perhaps
> MAXINT for negative indices.
Wouldn't that have the result of meaning a deck's selectedIndex becomes 0 or a very large number, instead of -1, when the app author wants to make sure nothing is selected? Traditionally, -1 means no selection at all, on both XUL (tree.currentIndex, menulist.selectedIndex, and the aforementioned deck) and HTML (select.selectedIndex).
Comment 8•18 years ago
|
||
Comment on attachment 247779 [details] [diff] [review]
patch, v1
Please file a followup bug, patch or both ;-)
Attachment #247779 -
Flags: superreview?(neil) → superreview+
Comment 9•18 years ago
|
||
Checking in nsDeckFrame.cpp;
/cvsroot/mozilla/layout/xul/base/src/nsDeckFrame.cpp,v <-- nsDeckFrame.cpp
new revision: 1.78; previous revision: 1.77
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Assignee | ||
Comment 10•18 years ago
|
||
per comment 8, filed bug 363112.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•