Small optimisation in nsJARChannel: prevents creation/deletion of ZipItem object

VERIFIED FIXED

Status

()

VERIFIED FIXED
16 years ago
11 years ago

People

(Reporter: alfredkayser, Assigned: alfredkayser)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030414
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030414

Patch follows

Reproducible: Always

Steps to Reproduce:
(Assignee)

Comment 1

16 years ago
Created attachment 121677 [details] [diff] [review]
Simple and easy patch

Replace GetEntry with Available, no object creation/deletion,
just the content-length. As Available is here called directly 
after opening the stream the returned value is always the real content-length.
(Assignee)

Updated

16 years ago
Attachment #121677 - Flags: superreview?(alecf)
Attachment #121677 - Flags: review?(darin)

Comment 2

16 years ago
Comment on attachment 121677 [details] [diff] [review]
Simple and easy patch

yup, i like it.  this prevents the JAR channel from having to deal directly
with nsIZipEntry :-)

r=darin
Attachment #121677 - Flags: review?(darin) → review+

Comment 3

16 years ago
over to alfred
Assignee: darin → alfredkayser
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 4

16 years ago
Comment on attachment 121677 [details] [diff] [review]
Simple and easy patch

sr=alecf

I wonder if this will allow us to stop #including nsIZipEntry somewhere.
Attachment #121677 - Flags: superreview?(alecf) → superreview+
(Assignee)

Updated

16 years ago
Blocks: 203627
(Assignee)

Comment 5

16 years ago
Created bug 203627 for nsIZipEntry removal investigation.

How to apply the patch? Do I need to request CVS access, and then
cvs it into the tree?
No longer blocks: 203627
Status: NEW → ASSIGNED
(Assignee)

Updated

16 years ago
Blocks: 203627
I'll check this in when the tree opens today.
Checked in. Sorry it took me so long.
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 8

15 years ago
Quick question: this doesn't depend on uncompressed entries, like Java does?
(Assignee)

Comment 9

15 years ago
No, this is about how to get the actual content length of the item,
and 'Available' just returns that (when called directly after opening).

Comment 10

15 years ago
OK, I only ask because Java's InflaterInputStream.available() doesn't always.
(Assignee)

Updated

11 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.