Closed Bug 310265 Opened 19 years ago Closed 2 years ago

nsArray does not provide class info

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: markh, Unassigned)

Details

(Whiteboard: not-ready-for-cedar)

Attachments

(2 files)

nsIArray is scriptable, but the nsArray implementation does not provide class
info.  Attaching a patch.
Comment on attachment 197656 [details] [diff] [review]
Patch so nsArray provides class info for nsIArray and nsIMutableArray

Timeless, you know a lot about CI, can you check this?
Attachment #197656 - Flags: superreview?(dougt)
Attachment #197656 - Flags: review?(timeless)
Comment on attachment 197656 [details] [diff] [review]
Patch so nsArray provides class info for nsIArray and nsIMutableArray

as i told mark, i'm hesitant due to perf backlash i got for some of my CI changes.
Attachment #197656 - Flags: review?(timeless) → review+
Comment on attachment 197656 [details] [diff] [review]
Patch so nsArray provides class info for nsIArray and nsIMutableArray

i am okay with this change if we don't regress as timeless indicates we might. 

Mark, do you have any data on this?
Attachment #197656 - Flags: superreview?(dougt) → superreview+
Assignee: dougt → mhammond
Did this ever get checked in?
Flags: blocking1.9a1?
nope
To be honest I just let it slide.  Timeless raise the spectre of getting hit with the performance stick (although I can't see how), and I could not identify existing code that needed this class info (although some code I was adding could have taken advantage of it).  For that reason I also could not justify taking time out to actually measure the perf.

If there is consensus we do actually want this I'm happy to help move forward.
I can't think of obvious reasons why adding classinfo would regress perf, offhand...
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]
Mark, is this worth checking in at some point when the tree is quiet to measure perf impact?
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Attached patch patchSplinter Review
two ways to check for CI in xpcshell:
js> Components.classes['@mozilla.org/array;1'].createInstance()
[xpconnect wrapped (nsISupports, nsIArray, nsIMutableArray) @ 0x100e2bc70 (native @ 0x100e2ba40)]

if you haven't used an @mozilla.org/array;1 array before then w/o CI you'd just get an nsISupports object

js> Components.classes['@mozilla.org/array;1'].createInstance().QueryInterface(Components.interfaces.nsIClassInfo)

this would throw an exception if there's no CI.
Assignee: mhammond → timeless
Status: NEW → ASSIGNED
Attachment #497101 - Flags: review?(doug.turner)
Attachment #497101 - Flags: approval2.0?
Attachment #497101 - Flags: review?(doug.turner) → review+
Attachment #497101 - Flags: approval2.0? → approval2.0-
Seems like we were worried that there's a perf impact here, which makes me not want to take this on cedar.
Whiteboard: not-ready-for-cedar

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: timeless → nobody
Status: ASSIGNED → NEW

We've gone this long without class info on nsArray, so it feels like we can leave this alone unless there's some specific need for it.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: