Closed Bug 1182979 Opened 9 years ago Closed 9 years ago

Use nsTHashTable::Iterator in dom/{plugins,media}/

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: n.nethercote, Assigned: poiru)

References

Details

Attachments

(4 files, 1 obsolete file)

Because iterators are so much nicer than enumerate functions.

There are seven occurrences of EnumerateEntries() in dom/{plugins,media}/ to be dealt with.
Assignee: nobody → birunthan
Status: NEW → ASSIGNED
Depends on: 1184419
ehsan, please note that poiru already assigned this one to himself. Hopefully he hasn't already done the the WebAudio changes. We don't want to waste time doing work multiple times. Thanks!
Flags: needinfo?(ehsan)
Attachment #8634799 - Flags: review?(jmathies)
Attachment #8634802 - Flags: review?(cpearce)
(In reply to Nicholas Nethercote [:njn] from comment #1)
> ehsan, please note that poiru already assigned this one to himself.
> Hopefully he hasn't already done the the WebAudio changes.

I didn't so clearing Ehsan's ni?.
Flags: needinfo?(ehsan)
Comment on attachment 8634799 [details] [diff] [review]
Part 1: Use nsTHashtable::Iterator in PluginInstanceChild

Review of attachment 8634799 [details] [diff] [review]:
-----------------------------------------------------------------

I'd like to see this code moved into a helper we call from here similar to the enumerate calls.

::: dom/plugins/ipc/PluginInstanceChild.cpp
@@ +3980,5 @@
> +        NPObject* o = e->GetKey();
> +        if (!e->mDeleted) {
> +            e->mDeleted = true;
> +
> +    #ifdef NS_BUILD_REFCNT_LOGGING

nit - this shouldn't be indented like this.
Attachment #8634799 - Flags: review?(jmathies) → review-
Attachment #8634800 - Flags: review?(jmathies) → review+
Attachment #8634799 - Attachment is obsolete: true
Comment on attachment 8634818 [details] [diff] [review]
Part 1: Use nsTHashtable::Iterator in PluginInstanceChild

Review of attachment 8634818 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you!
Attachment #8634818 - Flags: review?(jmathies) → review+
Comment on attachment 8634802 [details] [diff] [review]
Part 3: Use nsTHashtable::Iterator in GMPTimerParent

Review of attachment 8634802 [details] [diff] [review]:
-----------------------------------------------------------------

There are insufficient letters in the word "nice" to adequately express how much nicer this is. Nice!
Attachment #8634802 - Flags: review?(cpearce) → review+
Attachment #8634804 - Flags: review?(cpearce) → review+
niiiiiiiiiiiiiiiiice
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: