Closed
Bug 1313557
Opened 8 years ago
Closed 8 years ago
Data race: mIsShutdown in MediaDataDecoderProxy::InternalInit()
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(1 file)
http://searchfox.org/mozilla-central/rev/4012e61cc38758ffa1f7ce26039173f67b048853/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.cpp#27
Accessing mIsShutdown on the proxy thread is a data race because it is modified in Shutdown() on another thread.
In addition, the assertion is not right because there is no guarantee that InternalInit() always happens before Shutdown().
Assignee | ||
Updated•8 years ago
|
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8805420 -
Flags: review?(jyavenard)
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8805420 [details]
Bug 1313557 - remove the assertion from InternalInit() to avoid data race.
https://reviewboard.mozilla.org/r/89138/#review88300
to me it would be nicer to make this thread-safe by making IsShutdown atomic.
Also, if we're shutdown, there's no point attempting to initialise the GMP so may as well reject the promise immediately.
But seeing this is done only for debugging purposes... meh
Attachment #8805420 -
Flags: review?(jyavenard) → review+
Assignee | ||
Comment 3•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8805420 [details]
Bug 1313557 - remove the assertion from InternalInit() to avoid data race.
https://reviewboard.mozilla.org/r/89138/#review88300
It would be optimal to do that. But it won't buy us much because the chance of InternalInit() and Shutdown() happening at the same time is quite low.
Comment 4•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8805420 [details]
Bug 1313557 - remove the assertion from InternalInit() to avoid data race.
https://reviewboard.mozilla.org/r/89138/#review88300
I'm amazed you would settle for less than perfect ! :)
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c50b4bafe2e
remove the assertion from InternalInit() to avoid data race. r=jya
Comment 6•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•