Closed Bug 278369 Opened 21 years ago Closed 21 years ago

nsIXFormsControl should use COMArray

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan, Assigned: allan)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Quoting bryner, on bug 265467: >--- xforms.newbranch/nsIXFormsControl.idl 2004-11-04 22:12:22.000000000 >+0100 >+++ xforms.mdg-branch/nsIXFormsControl.idl 2005-01-10 16:56:24.000000000 >+0100 >@@ -33,20 +33,49 @@ >... >+ /** >+ * The instance nodes that the control depend on. These MUST be sorted, >+ * pointer-order, ascending. >+ */ >+ readonly attribute nsIArray dependencies; >Would be nice if this could be a nsCOMArray since this method doesn't need to >be scriptable. It should be possible to declare it as such in IDL using >[native, ref] or something like that... there should be some examples in the >tree.
Attached patch Patch v1 (obsolete) — Splinter Review
* Uses COMArray as bryner suggested * Kills nsXFormsMDGSet entirely, and uses nsCOMArray<nsIDOMNode> everywhere. I'm not too sure about the IDL-business. It compiles and "works for me", but is it the correct way to do it?
Attachment #175109 - Flags: review?(smaug)
Status: NEW → ASSIGNED
Comment on attachment 175109 [details] [diff] [review] Patch v1 This breaks http://www.mozilla.org/projects/xforms/sample1.xhtml I see the following assertions (in an endless oop?): ###!!! ASSERTION: index out of range: '0 <= aIndex && aIndex < Count()', file nsVoidArray.h, line 71 Break: at file nsVoidArray.h, line 71
Attachment #175109 - Flags: review?(smaug) → review-
(In reply to comment #3) > loop If you hadn't written that, I would never have understood your comment. Never. I mean it! Never! :)
(In reply to comment #2) > (From update of attachment 175109 [details] [diff] [review] [edit]) > This breaks http://www.mozilla.org/projects/xforms/sample1.xhtml > > I see the following assertions (in an endless oop?): > ###!!! ASSERTION: index out of range: '0 <= aIndex && aIndex < Count()', file > nsVoidArray.h, line 71 > Break: at file nsVoidArray.h, line 71 Argh. I remember looking through the patch before uploading it, and thinking something in the lines of "Hey stupid, that loop can be made more optimal", and then "optimizing" it. *doh*
Attached patch Patch v2Splinter Review
*ahem*. Let's try again.
Attachment #175109 - Attachment is obsolete: true
Attachment #175275 - Flags: review?(smaug)
Comment on attachment 175275 [details] [diff] [review] Patch v2 Now this looks ok to me, and it even seems to work ;)
Attachment #175275 - Flags: review?(smaug) → review+
Doron, will you do the 2nd review?
r=me
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: