Closed Bug 397733 Opened 17 years ago Closed 17 years ago

[FIX]Somewhat reduce the memory taken up by principals

Categories

(Core :: Security: CAPS, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: memory-footprint)

Attachments

(1 file)

Attached patch Like soSplinter Review
Two changes: 1) Allocate mCapabilities lazily in nsPrincipal, since usually it's not needed. 2) Use string buffers for JSPRincipals.codebase, so in the common nsPrincipal case we'll share the string with our URI or cert.
Attachment #282509 - Flags: superreview?(jst)
Attachment #282509 - Flags: review?(jst)
Blocks: 389188
Comment on attachment 282509 [details] [diff] [review] Like so Looks good. r+sr=jst
Attachment #282509 - Flags: superreview?(jst)
Attachment #282509 - Flags: superreview+
Attachment #282509 - Flags: review?(jst)
Attachment #282509 - Flags: review+
Comment on attachment 282509 [details] [diff] [review] Like so Requesting approval. This should reduce memory consumption a bit in some cases. It doesn't change behavior, except in OOM situations (when it makes attempts to enablePrivilege throw isntead of principal creation throwing).
Attachment #282509 - Flags: approval1.9?
Keywords: footprint
Attachment #282509 - Flags: approval1.9? → approval1.9+
Fixed. I don't know that we can write reasonable tests for this...
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9 M10 → mozilla1.9 M9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: