Investigate whether or not EncodedBufferCache needs a reentrant lock.

RESOLVED FIXED in mozilla26

Status

()

Core
Audio/Video: Recording
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: khuey, Assigned: rlin)

Tracking

unspecified
mozilla26
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

EncodedBufferCache uses a ReentrantMonitor.  This allows the same thread to lock the monitor multiple times without deadlocking.  If that is unnecessary we should replace it with a regular Mutex.  I couldn't see any obvious paths for reentrancy, but it's possible I missed something.

I originally noticed this because of the unnecessary forward declaration at http://hg.mozilla.org/mozilla-central/annotate/3ea0cb5a747e/content/media/EncodedBufferCache.h#l17.  We should remove that even if the ReentrantMonitor is needed.
umm, I think it can use a mutex to replace the ReentrantMonitor.
Protect the mEncodedBuffers/mDataSize.
Please do that :-)
Assignee: nobody → rlin
Created attachment 787960 [details] [diff] [review]
patch v1

Use MutexAutoLock to replace the ReentrantMonitor.
Attachment #787960 - Flags: review?(roc)
Attachment #787960 - Flags: review?(roc) → review+
try result
https://tbpl.mozilla.org/?tree=Try&rev=a083bd250759
Keywords: checkin-needed
https://hg.mozilla.org/integration/b2g-inbound/rev/328f5dc01949
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/328f5dc01949
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26

Updated

4 years ago
Blocks: 896935
No longer blocks: 803414
Whiteboard: [qa-]

Updated

4 years ago
No longer blocks: 896935
Component: Video/Audio → Video/Audio: Recording
You need to log in before you can comment on or make changes to this bug.