Closed Bug 1285231 Opened 9 years ago Closed 9 years ago

Don't use Move() to empty plugins list in GMPServiceParent.cpp

Categories

(Core :: Audio/Video: GMP, defect, P2)

50 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

Details

Attachments

(1 file)

I've used Move() to move the contents of the plugins list to a local variable in GeckoMediaPluginServiceParent::UnloadPlugins(), expecting that the source list would be emptied. However misleadingly-named Move() does not guarantee that the source object will actually be emptied. https://hg.mozilla.org/mozilla-central/annotate/09221c72fcb03a7c2b4ab27c75304eae3247e3d1/dom/media/gmp/GMPServiceParent.cpp#l722 An easy fix in this case should be to just swap the contents of the local (empty) list with the plugins list.
Attachment #8768788 - Flags: review?(jwwang) → review+
Comment on attachment 8768788 [details] Bug 1285231 - Use Swap to move&empty plugins list before unloading - https://reviewboard.mozilla.org/r/62838/#review59736
Rank: 21
Priority: -- → P2
Thank you for the review, JW.
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a123c6c6dbf Use Swap to move&empty plugins list before unloading - r=jwwang
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: