Closed
Bug 12734
Opened 25 years ago
Closed 25 years ago
Checking for duplicate insertions
Categories
(Core :: XUL, defect, P2)
Core
XUL
Tracking
()
VERIFIED
FIXED
M12
People
(Reporter: daniel, Assigned: waterson)
References
()
Details
The lines:
PRInt32 i = mChildren->IndexOf(aKid);
NS_ASSERTION(i < 0, "element is already a child");
if (i >= 0)
return NS_ERROR_FAILURE;
make little sense, either the interface supports checking for duplicate
insertions and the NS_ASSERTION should be removed, or the interface doesn't
support it and then the "return NS_ERROR_FAILURE" should be removed. I would
suggest replacing these lines with
NS_ASSERTION(mChildren->IndexOf(aKid) < 0,
"element is already a child");
to prevent the IndexOf enumeration from happening in non-debug builds.
(It's pretty minor, the only 50+ elements enumeration I could find was when
starting up the editor)
Assignee | ||
Updated•25 years ago
|
Assignee | ||
Comment 1•25 years ago
|
||
Yep, this is dumb. We should be checking in the implementations of the DOM
APIs, not the content APIs. Good catch.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M11 → M12
Assignee | ||
Updated•25 years ago
|
Priority: P3 → P2
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
QA Contact: phillip → waterson
Resolution: --- → FIXED
Assignee | ||
Comment 2•25 years ago
|
||
damn, i can't believe i've sat on this for so long. fix checked in. thanks zee.
Updated•25 years ago
|
QA Contact: waterson → ckritzer
Comment 3•25 years ago
|
||
Changing QA Contact to ckritzer@netscape.com
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
QA Contact: ckritzer → paulmac
Comment 4•25 years ago
|
||
verified
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL. XUL
component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: paulmac → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•