Closed Bug 1048097 Opened 8 years ago Closed 8 years ago

[EME] GMP process leaking nsTArray when in decrypt mode.

Categories

(Core :: Audio/Video, defect)

29 Branch
x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Running the GMP/CDM in decrypt mode causes an nsTArray leak:

== BloatView: ALL (cumulative) LEAK STATISTICS, geckomediaplugin process 2532

     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|
                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev
GM   0 TOTAL                                           4      308     1200       77 (   53.19 +/-    23.73)      100        0 (    1.46 +/-     0.66)
PPa  13 nsTArray_base                                   4      308     1178       77 (   54.20 +/-    22.80)        0        0 (    0.00 +/-     0.00)
re
ntnsTraceRefcnt::DumpStatistics: 13 entries

This is the nsTArray in the GMPBufferImpl that's created in GMPDecryptorChild::RecvDecrypt and sent through the GMP for decryption.
Attached patch PatchSplinter Review
Attachment #8466864 - Flags: review?(rjesup)
Comment on attachment 8466864 [details] [diff] [review]
Patch

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

::: content/media/gmp/GMPDecryptorChild.cpp
@@ +156,3 @@
>    auto buffer = static_cast<GMPBufferImpl*>(aBuffer);
>    SendDecrypted(buffer->mId, aResult, buffer->mData);
> +  delete buffer;

Document in the interface .h file that this is an explicit transfer of ownership
Attachment #8466864 - Flags: review?(rjesup) → review+
Flags: needinfo?(cpearce)
https://hg.mozilla.org/mozilla-central/rev/89f0af4d12d4
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.