Closed Bug 1276838 Opened 4 years ago Closed 4 years ago

Improve ergonomics for cubeb function calls for AudioStream

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Cubeb function must be called without lock held to avoid deadlock. Therefore we used to have code like:

int r;
{
  MonitorAutoUnlock mon(mMonitor);
  r = cubeb_stream_xxx();
}
// do something about the return value |r|.

This style is a bit ugly. We can do something instead:

int r = InvokeCubebFunction();
// do something about the return value |r|.

InvokeCubebFunction will release the monitor before calling cubeb functions.
Assignee: nobody → jwwang
Blocks: 1274160
Attachment #8758126 - Flags: review?(kinetik) → review+
Comment on attachment 8758126 [details]
MozReview Request: Bug 1276838 - improve coding style of calling cubeb functions. r=kinetik.

https://reviewboard.mozilla.org/r/56492/#review53082
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/373e67c2caad
improve coding style of calling cubeb functions. r=kinetik.
https://hg.mozilla.org/mozilla-central/rev/373e67c2caad
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.