Closed
Bug 387096
Opened 17 years ago
Closed 11 years ago
A nsIZipEntry can't be used anymore after nsIZipReader.close()
Categories
(Core :: Networking: JAR, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: Yoric, Assigned: Cykesiopka)
Details
Attachments
(1 file, 1 obsolete file)
1.10 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4 (Swiftfox) XPCOMViewer/0.9.5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4 (Swiftfox) XPCOMViewer/0.9.5 In my extension, I used the following process: * open a nsIZipReader from a file * locate some entry inside that nsIZipReader * close the nsIZipReader * use the name of the entry with nsIZipEntry.name . The result was random bugs, as the nsIZipEntry had been deallocated by nsIZipReader.close(), although it was still referenced. I don't think it's a big issue *provided the documentation is clarified*. Suggested change: Change /** * Closes a zip reader. Subsequent attempts to extract files or read from * its input stream will result in an error. */ to /** * Closes a zip reader. Subsequent attempts to extract files or read from * its input stream will result in an error. * * Subsequent attempts to access a nsIZipEntry obtained from this zip * reader will cause unspecified behavior. */ Reproducible: Always Steps to Reproduce: 1. 2. 3.
Updated•11 years ago
|
Component: XPCOM → Networking: JAR
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #722148 -
Flags: review?(dteller)
Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 722148 [details] [diff] [review] Proposed Patch Review of attachment 722148 [details] [diff] [review]: ----------------------------------------------------------------- I had completely forgotten about that bug. Thanks for the docfix. Could you also update https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIZipReader#close%28%29 ?
Attachment #722148 -
Flags: review?(dteller) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #2) > Comment on attachment 722148 [details] [diff] [review] > Proposed Patch > > Review of attachment 722148 [details] [diff] [review]: > ----------------------------------------------------------------- > > I had completely forgotten about that bug. > Thanks for the docfix. > > Could you also update > https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/ > nsIZipReader#close%28%29 ? Done.
Assignee: nobody → cykesiopka
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #722148 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/31b28458cee6
Keywords: checkin-needed
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/31b28458cee6
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•