Closed
Bug 380674
Opened 18 years ago
Closed 18 years ago
Move nsTObserverArray from content/* to xpcom/*
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
23.48 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
nsTObserverArray would be useful outside gecko.
I think the name should be changed too.
nsTMutableArray is not right, nor is nsTIterativeArray, but the
current name isn't good one either, IMO, if the class will be used
also with objects that aren't observers (presShell are only sort of
observers, bug 378776).
What would be the right place, xpcom/ds or xpcom/glue?
I guess the latter one where also nsTArray and nsVoidArray etc. are.
Btw, if CVS move (with history data and all) is needed, I don't know
how to do that.
nsTIterationSafeArray, nsTMutationSafeArray, nsTIterableArray.
Assignee | ||
Comment 2•18 years ago
|
||
Though, because observer array doesn't work like a normal array,
maybe the current name is good enough.
Assignee | ||
Comment 3•18 years ago
|
||
Would this be ok? Do we want nsTObserverArray in SDK_HEADERS?
Attachment #264864 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Attachment #264864 -
Flags: review? → review?(benjamin)
Comment 4•18 years ago
|
||
Comment on attachment 264864 [details] [diff] [review]
v1
>--- /dev/null 2007-05-12 20:28:07.458080988 +0300
>+++ xpcom/glue/nsTObserverArray.h 2007-05-15 13:22:54.000000000 +0300
>+// XXXbz I wish I didn't have to pass in the observer type, but I
>+// don't see a way to get it out of array_.
You can, actually. You just need a typedef in nsTObserverArray
typedef T elementtype;
(You might need "typename T" to get it to compile.)
Then instead of having to specify obstype_, you can just use array_::elementtype
Attachment #264864 -
Flags: review?(benjamin) → review+
![]() |
||
Comment 5•18 years ago
|
||
Oh, good point! Let's do that, possibly as a followup!
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•18 years ago
|
Assignee: nobody → Olli.Pettay
Status: REOPENED → NEW
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•