Closed Bug 346010 Opened 14 years ago Closed 11 years ago

Decom nsIJAR by merging it into nsIZipReader

Categories

(Core :: Networking: JAR, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: alfredkayser, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Keywords: memory-footprint)

Attachments

(1 file)

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
Darin, what do you think about this?
Component: Networking: File → Networking: JAR
QA Contact: networking.file → networking.jar
Attached patch patch v1Splinter Review
Attachment #425156 - Flags: review?(tglek)
Looks good!
Blocks: deCOM
This code simplification looks good to me. Benjamin can we take a change that moves methods between public interfaces like this?
They aren't frozen, are they? Should be fine.
Attachment #425156 - Flags: review?(tglek) → review+
Attachment #425156 - Flags: superreview?(benjamin)
Assignee: nobody → m_kato
Attachment #425156 - Flags: superreview?(benjamin) → superreview+
landed
http://hg.mozilla.org/mozilla-central/rev/9dbceefc8c6c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.