Closed
Bug 1008420
Opened 10 years ago
Closed 10 years ago
Split out a refcountless nsArray base class
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(2 files)
1.97 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
9.69 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
I keep needing this, so I should just get it reviewed and landed.
Assignee | ||
Comment 1•10 years ago
|
||
Currently, nsArray uses threadsafe refcounting, while nsArrayCC uses non-threadsafe refcounting, but inherits from nsArray, thus shadowing the refcounting implementation of nsArray. I am going to create a new nsArrayBase class that has no refcounting, and then make nsArray and nsArrayCC inherit from it.
Comment 2•10 years ago
|
||
I don't understand. The only reason I can see somebody needing nsArray is because you need to pass it around to scriptable stuff. Otherwise why not just use nsTArray? Arguably we should get rid of nsIArray/nsArray/nsArrayCC altogether.
Assignee | ||
Comment 3•10 years ago
|
||
I don't know why anybody uses it, I'm just trying to get rid of the shadowing of mRefCnt.
Assignee | ||
Comment 4•10 years ago
|
||
(Because if I can statically prevent the shadowing of mRefCnt I can prevent a certain class of cycle collector errors like bug 1004630.)
Assignee | ||
Comment 5•10 years ago
|
||
I'll give bsmedberg the right of first refusal here, in case he has some objections. try run: https://tbpl.mozilla.org/?tree=Try&rev=6cabd1d69357
Attachment #8420656 -
Flags: review?(benjamin)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8420657 -
Flags: review?(benjamin)
Updated•10 years ago
|
Attachment #8420656 -
Flags: review?(benjamin) → review+
Updated•10 years ago
|
Attachment #8420657 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 7•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/cdd9cd53b362 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/a0d2fc4bb053
https://hg.mozilla.org/mozilla-central/rev/cdd9cd53b362 https://hg.mozilla.org/mozilla-central/rev/a0d2fc4bb053
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•