Closed Bug 227491 Opened 21 years ago Closed 21 years ago

[FIXr]Better array stuff in nsBaseWidget

Categories

(Core :: Web Painting, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(2 files, 1 obsolete file)

Less QI/addref/release, coming up.
Attached patch nsCOMArray! (obsolete) — Splinter Review
Attachment #136808 - Flags: superreview?(dbaron)
Attachment #136808 - Flags: review?(caillon)
Priority: -- → P2
Summary: Better array stuff in nsBaseWidget → [FIX]Better array stuff in nsBaseWidget
Target Milestone: --- → mozilla1.7alpha
Comment on attachment 136808 [details] [diff] [review] nsCOMArray! Beauty -- expand tabs to 2-space-equiv while you're there? /be
Most of the file is tab-indented, actually... I purposefully kept them.
1.7a sounds like a fine time to expand 'em all. diff -w will help us see past them, and cvs annotate -r will help cvs archeologists find whodunnit. /be
Comment on attachment 136808 [details] [diff] [review] nsCOMArray! This is actually slightly wrong...
Attachment #136808 - Flags: superreview?(dbaron)
Attachment #136808 - Flags: superreview-
Attachment #136808 - Flags: review?(caillon)
Attachment #136808 - Flags: review-
Attachment #136808 - Attachment is obsolete: true
Attached patch Same as diff -wSplinter Review
Attachment #136916 - Flags: superreview?(dbaron)
Attachment #136916 - Flags: review?(caillon)
Comment on attachment 136916 [details] [diff] [review] Same as diff -w Looks fine, but how about other platforms?
The other platforms don't access mChildren directly -- they go through the silly enumerator GetChildren() returns. In fact, the GTK code does so itself at other callsites. I suppose I could clean that up to use mChildren where possible and roll that into this bug...
Attachment #136916 - Flags: superreview?(dbaron) → superreview+
Comment on attachment 136916 [details] [diff] [review] Same as diff -w (Pre-existing) Irrational Control Flow alert: + if ( mCurrentPosition < mParent.mChildren.Count() ) + NS_IF_ADDREF(*aItem = mParent.mChildren[mCurrentPosition]); else return NS_ERROR_FAILURE; return NS_OK; if (A) B; else return C; return D; should be if (!A) return C; B; return D: /be
Attachment #136916 - Flags: review?(caillon) → review+
Summary: [FIX]Better array stuff in nsBaseWidget → [FIXr]Better array stuff in nsBaseWidget
Fixed in 1.7a, without making the changes in comment 10 (they would have to be made all over, really; that pattern is common in that file).
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: