Closed Bug 1420798 Opened 7 years ago Closed 7 years ago

Apply the ProofOfLock pattern to MediaCache

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

MediaCache::Foo()
{
  mReentrantMonitor.AssertCurrentThreadIn();
}

MediaCache::Bar()
{
  ReentrantMonitorAutoEnter mon(mReentrantMonitor);
  Foo();
}

can be replaced by

MediaCache::Foo(ReentrantMonitorAutoEnter& aLock)
{
}

MediaCache::Bar()
{
  ReentrantMonitorAutoEnter mon(mReentrantMonitor);
  Foo(mon);
}

This allows us to replace ReentrantMonitor with Monitor in the future.
Assignee: nobody → jwwang
Blocks: 1369263
Priority: -- → P3
Attachment #8932295 - Flags: review?(bechen)
Comment on attachment 8932295 [details]
Bug 1420798 - apply the 'ProofOfLock' pattern to MediaCache.

https://reviewboard.mozilla.org/r/203326/#review208708
Attachment #8932295 - Flags: review?(bechen) → review+
Attachment #8932295 - Flags: review?(gsquelart)
Comment on attachment 8932295 [details]
Bug 1420798 - apply the 'ProofOfLock' pattern to MediaCache.

https://reviewboard.mozilla.org/r/203326/#review208738
Attachment #8932295 - Flags: review?(gsquelart) → review+
Thanks for the reviews!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bafd5fe6a059
apply the 'ProofOfLock' pattern to MediaCache. r=bechen,gerald
https://hg.mozilla.org/mozilla-central/rev/bafd5fe6a059
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: