Closed
Bug 967941
Opened 12 years ago
Closed 11 years ago
Convert nsZipReaderCache::mZips to a modern hashtable
Categories
(Core :: Networking: JAR, defect)
Core
Networking: JAR
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(3 files, 2 obsolete files)
15.96 KB,
patch
|
bugzilla
:
review+
|
Details | Diff | Splinter Review |
10.66 KB,
patch
|
bugzilla
:
review+
|
Details | Diff | Splinter Review |
2.87 KB,
patch
|
bugzilla
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
As a bonus, I can fix the quadratic behavior in nsZipReaderCache::Observe.
Assignee | ||
Updated•11 years ago
|
Summary: Convert nsJAR to a modern hashtable → Convert nsJAR::mZips to a modern hashtable
Assignee | ||
Updated•11 years ago
|
Summary: Convert nsJAR::mZips to a modern hashtable → Convert nsZipReaderCache::mZips to a modern hashtable
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
With this patch, modules/libjar/test/unit/test_bug637286.js is failing. It hits some kind of deadlock detection. My theory is that this is due to causing a change in how objects are addrefed and released, causing some object to die too early, but I haven't had any success investigating it so far.
Assignee | ||
Comment 4•11 years ago
|
||
Taras, let me know if you aren't the right person to review this. I could get froydnj to review it instead or something.
https://tbpl.mozilla.org/?tree=Try&rev=919977e5c90b
Attachment #8379771 -
Flags: review?(taras.mozilla)
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8379773 -
Flags: review?(taras.mozilla)
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8379774 -
Flags: review?(taras.mozilla)
Assignee | ||
Updated•11 years ago
|
Attachment #8375843 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8375846 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #8379771 -
Flags: review?(taras.mozilla) → review?(aklotz)
Updated•11 years ago
|
Attachment #8379773 -
Flags: review?(taras.mozilla) → review?(aklotz)
Updated•11 years ago
|
Attachment #8379774 -
Flags: review?(taras.mozilla) → review?(aklotz)
Comment 7•11 years ago
|
||
Comment on attachment 8379771 [details] [diff] [review]
part 1 - Remove some trailing whitespace from nsJAR.{h,cpp}.
Review of attachment 8379771 [details] [diff] [review]:
-----------------------------------------------------------------
::: modules/libjar/nsJAR.cpp
@@ +121,5 @@
> #endif
> mCache->ReleaseZip(this);
> NS_ASSERTION(NS_SUCCEEDED(rv), "failed to release zip file");
> }
> return count;
There's a trailing space here.
@@ +639,2 @@
> curLine.Assign(curPos, linelen);
> if (linelen == 0)
There's a trailing space here.
@@ +1037,5 @@
>
> NS_IMETHODIMP
> nsZipReaderCache::Init(uint32_t cacheSize)
> {
> mCacheSize = cacheSize;
and here
@@ +1044,1 @@
> nsCOMPtr<nsIObserverService> os =
and here
@@ +1209,5 @@
> }
> return true;
> }
>
> struct ZipFindData {nsJAR* zip; bool found;};
Here
::: modules/libjar/nsJAR.h
@@ +144,2 @@
> uint32_t mPermissions;
> bool mIsDirectory;
There's a trailing space here.
Attachment #8379771 -
Flags: review?(aklotz) → review+
Comment 8•11 years ago
|
||
Comment on attachment 8379773 [details] [diff] [review]
part 2 - Convert nsZipReaderCache::mZips to use nsRefPtrHashtable.
Review of attachment 8379773 [details] [diff] [review]:
-----------------------------------------------------------------
::: modules/libjar/nsJAR.cpp
@@ +1279,2 @@
> nsRefPtr<nsJAR> removed;
> + mZips.Remove(uri, getter_AddRefs(removed));
I can't find any overload of Remove() that does a Get + Remove in one call.
Attachment #8379773 -
Flags: review?(aklotz) → review-
Updated•11 years ago
|
Attachment #8379774 -
Flags: review?(aklotz) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Ah, yeah, sorry, I'm adding one in bug 975223. I was just going to wait on this patch being ready to land before landing it.
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 8379773 [details] [diff] [review]
part 2 - Convert nsZipReaderCache::mZips to use nsRefPtrHashtable.
See comment 9.
Attachment #8379773 -
Flags: review- → review?(aklotz)
Comment 11•11 years ago
|
||
Comment on attachment 8379773 [details] [diff] [review]
part 2 - Convert nsZipReaderCache::mZips to use nsRefPtrHashtable.
Review of attachment 8379773 [details] [diff] [review]:
-----------------------------------------------------------------
Cool.
Attachment #8379773 -
Flags: review?(aklotz) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Thanks for the reviews! I just went ahead and removed all trailing whitespace in nsJAR.h and nsJAR.cpp.
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/36e79221886d
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/ef74212f2e25
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/68c714066b0c
Comment 13•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/36e79221886d
https://hg.mozilla.org/mozilla-central/rev/ef74212f2e25
https://hg.mozilla.org/mozilla-central/rev/68c714066b0c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•