Closed Bug 165574 Opened 22 years ago Closed 22 years ago

PSM embedding freeze/ step 3/ replace nsISupportsArray with nsIArray

Categories

(Core Graveyard :: Security: UI, defect, P1)

Other Branch
defect

Tracking

(Not tracked)

VERIFIED FIXED
psm2.4

People

(Reporter: KaiE, Assigned: KaiE)

References

Details

Attachments

(1 file, 1 obsolete file)

Stephane told me, PSM should no longer use nsISupportArray. Should that change be done before 1.2?
yes! its not that you have to stop using nsISupportsArray entirely, its that your interfaces should not use nsISupportsArray to return lists of objects to callers. The problem is that embeddors are calling a few of your APIs, and are getting an nsISupportsArray, which is off-limit to embeddors because we're not going to freeze it.
(that "yes!" was in response to the question about 1.2 - the sooner we get this the better, but we absolutely must have it by 1.2beta. Thanks :)
Depends on: 162115
nsISimpleEnumerator is a very simple interface. Please see my comments in bug 162115. If possible, we should introduce and freeze a simpler array interface, to avoid unnecessary copying.
Keywords: nsbeta1+
Priority: -- → P1
Target Milestone: --- → 2.4
Summary: get rid of nsISupportArray - use nsISimpleEnumerator instead → PSM embedding freeze/ step 3/ replace nsISupportsArray with nsIArray
Blocks: 168452
Attached patch Patch v1 (obsolete) — Splinter Review
The attached patch implements the changes to PSM, that removes nsISupportsArray from all interfaces, and uses Alec's new array classes instead. Please review.
Comment on attachment 101631 [details] [diff] [review] Patch v1 r=javi
Attachment #101631 - Flags: review+
Comment on attachment 101631 [details] [diff] [review] Patch v1 mostly looks good, a few issues: * Get a list of Crl entries in the DB. */ - nsISupportsArray getCrls(); + nsIMutableArray getCrls(); Do you really want this to be mutable? Shouldn't this be nsIArray instead? see: http://lxr.mozilla.org/seamonkey/source/xpcom/ds/nsIArray.idl#58 http://lxr.mozilla.org/seamonkey/source/xpcom/ds/nsIArray.idl#129 - attribute nsISupportsArray ASN1Objects; + attribute nsIMutableArray ASN1Objects; - nsISupportsArray getChain(); + nsIMutableArray getChain(); - nsISupportsArray getOCSPResponders(); + nsIMutableArray getOCSPResponders(); these too. Actually, that's the only problem I see... with those switched to nsIArray, sr=alecf
Attachment #101631 - Flags: review+ → superreview+
> Do you really want this to be mutable? Shouldn't this be nsIArray instead? You partially convinced me. + nsIMutableArray getCrls(); + nsIMutableArray getChain(); + nsIMutableArray getOCSPResponders(); ok, changed to nsIArray + attribute nsIMutableArray ASN1Objects; The object referenced through the interface is passed around and the attribute gets modified. This must be mutable, if we don't want to rewrite the code.
oh! that wasn't obvious from the patch, but from looking in LXR I see what you mean. my sr= stands
Attached patch Patch v2Splinter Review
This is the patch having the promised and blessed changes.
Attachment #101631 - Attachment is obsolete: true
Comment on attachment 102567 [details] [diff] [review] Patch v2 marking r=javi from comment 6 and carrying forward sr=alecf
Attachment #102567 - Flags: superreview+
Attachment #102567 - Flags: review+
Attachment #102567 - Flags: approval+
Comment on attachment 102567 [details] [diff] [review] Patch v2 a=asa for checkin to 1.2beta (on behalf of drivers)
fixed on trunk
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
Product: PSM → Core
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: