Closed Bug 1171830 Opened 7 years ago Closed 7 years ago

Remove PL_DHashTableEnumerator use from nsDocLoader

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(2 files)

PLDHashTable now has an iterator and a Clear() method, which lets us avoid some
PL_DHashTableEnumerate() calls in nsDocLoader.cpp.
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 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-
> 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.
Attachment #8616990 - Flags: review?(bugs) → review+
Thank you for the fast review :)
https://hg.mozilla.org/mozilla-central/rev/86293a07e4c3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.