Closed Bug 1184432 Opened 9 years ago Closed 9 years ago

Use nsClassHashtable::ConstIter in GeckoMediaPluginServiceParent::AsyncShutdownPluginStates

Categories

(Core :: Audio/Video: Playback, defect)

42 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

Details

Attachments

(1 file)

Spawned from bug 1183433 comment 4, which needs to be uplifted and therefore couldn't use the new iterator.
This bug is to replace the now-obsolete EnumerateRead with ConstIter, which is only available in 42 and later (see bug 1181445).
Or use range-for if it becomes available soon (see bug 1149833).
Use nsClassHashtable::ConstIter instead of now-obsolete EnumerateRead, in GeckoMediaPluginServiceParent::AsyncShutdownPluginStates.

(Taking this patch off my mental plate. If range-based for gets enabled soon, it will be a very small increment on top of this patch.)
Attachment #8635022 - Flags: review?(cpearce)
Comment on attachment 8635022 [details] [diff] [review]
1184432-asyncshutdown-reporting-using-hastable-iter.patch

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

::: dom/media/gmp/GMPServiceParent.cpp
@@ +424,5 @@
>    state->mLastStateDescription = aState;
>    note += '{';
> +  bool firstPlugin = true;
> +  for (auto pluginIt = mStates.ConstIter(); !pluginIt.Done(); pluginIt.Next()) {
> +    if (!firstPlugin) { note += ','; } else { firstPlugin = false; }

if (x) {
  // ...
} else {
  // ...
}

no single line if blocks.
Attachment #8635022 - Flags: review?(cpearce) → review+
https://hg.mozilla.org/mozilla-central/rev/ca42fdde60f6
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Depends on: 1201904
No longer depends on: 1201904
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: