Decom nsIJAR by merging it into nsIZipReader

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
13 years ago
9 years ago

People

(Reporter: alfredkayser, Assigned: m_kato)

Tracking

(Blocks 1 bug, {memory-footprint})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
nsIJAR is only used to define getCertificatePrincipal and ManifestCount for a ZipReader. By moving nsIJAR into nsIZipReader, we can skip on a number of needless do_QueryInterfaces (as the underlying object is always the same):
    nsCOMPtr<nsIJAR> systemCertJar(do_QueryInterface(systemCertZip, &rv));
    if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
    rv = systemCertJar->GetCertificatePrincipal(nsnull,
                                                getter_AddRefs(mSystemCertificate));
becomes:
    rv = systemCertZip->GetCertificatePrincipal(nsnull,
                                                getter_AddRefs(mSystemCertificate));

Callers are:
http://lxr.mozilla.org/seamonkey/source/xpinstall/src/nsSoftwareUpdateRun.cpp#109
http://lxr.mozilla.org/seamonkey/source/caps/src/nsScriptSecurityManager.cpp#2645
http://lxr.mozilla.org/seamonkey/source/modules/libjar/nsJARChannel.cpp#480
(Reporter)

Comment 1

13 years ago
Darin, what do you think about this?
(Reporter)

Updated

13 years ago
Component: Networking: File → Networking: JAR
QA Contact: networking.file → networking.jar
(Assignee)

Comment 2

9 years ago
Posted patch patch v1Splinter Review
(Assignee)

Updated

9 years ago
Attachment #425156 - Flags: review?(tglek)
(Reporter)

Comment 3

9 years ago
Looks good!
Blocks: deCOM

Comment 4

9 years ago
This code simplification looks good to me. Benjamin can we take a change that moves methods between public interfaces like this?

Comment 5

9 years ago
They aren't frozen, are they? Should be fine.

Updated

9 years ago
Attachment #425156 - Flags: review?(tglek) → review+
(Assignee)

Updated

9 years ago
Attachment #425156 - Flags: superreview?(benjamin)
(Assignee)

Updated

9 years ago
Assignee: nobody → m_kato

Updated

9 years ago
Attachment #425156 - Flags: superreview?(benjamin) → superreview+
(Assignee)

Comment 6

9 years ago
landed
http://hg.mozilla.org/mozilla-central/rev/9dbceefc8c6c
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.