Remove PL_DHashTableEnumerator use from nsDocLoader

RESOLVED FIXED in Firefox 41

Status

()

Core
Document Navigation
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

3 years ago
PLDHashTable now has an iterator and a Clear() method, which lets us avoid some
PL_DHashTableEnumerate() calls in nsDocLoader.cpp.
(Assignee)

Comment 1

3 years ago
Created attachment 8615842 [details] [diff] [review]
Remove PL_DHashTableEnumerator use from nsDocLoader

One thing to note: the old ClearRequestInfoHash() function would clear all the
entries in the hash table but leave the entry storage in place. The new version
frees the entry storage; that's how PLDHashTable::Clear() works. This
difference will be noticeable if the code holds onto a pointer to a particular
element and then accesses it after ClearRequestInfoHash() is called. This would
be an odd thing to do and I can't see anything in the code like that, but I
thought I'd mention the possibility.
Attachment #8615842 - Flags: review?(bugs)

Comment 2

3 years ago
Comment on attachment 8615842 [details] [diff] [review]
Remove PL_DHashTableEnumerator use from nsDocLoader

Er, isn't this some odd reverse patch.
Attachment #8615842 - Flags: review?(bugs) → review-
(Assignee)

Comment 3

3 years ago
> Er, isn't this some odd reverse patch.

Yes it is. I have no idea how I managed to do that given that I'm using |hg mq| + |hg bzexport|. Anyway, let me try again.
(Assignee)

Comment 4

3 years ago
Created attachment 8616990 [details] [diff] [review]
Remove PL_DHashTableEnumerator use from nsDocLoader
Attachment #8616990 - Flags: review?(bugs)

Updated

3 years ago
Attachment #8616990 - Flags: review?(bugs) → review+
(Assignee)

Comment 5

3 years ago
Thank you for the fast review :)
(Assignee)

Updated

3 years ago
Blocks: 1128407

Comment 6

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/86293a07e4c3
https://hg.mozilla.org/mozilla-central/rev/86293a07e4c3
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.