Closed
Bug 1050582
Opened 11 years ago
Closed 11 years ago
Is on main thread assertion in GMPTimer can fail first call into GMPTimer is off main thread.
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: cpearce, Assigned: cpearce)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
952 bytes,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
SetTimerOnMainThread() calls GMPChild::GetGMPTimers(), which calls the GMPTimerChild constructor on its first call. SetTimer is supposed to be only called on the main thread. But the check to ensure we're on the main thread is inside the GMPTimerChild::SetTimer() function. So if the first time SetTimer is called is off main thread, the GMPTimerChild ctor will run off main thread, and will fail.
SetTimerOnMainThread() should check that it's called on the main thread only.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8469687 -
Flags: review?(rjesup)
Comment 2•11 years ago
|
||
Comment on attachment 8469687 [details] [diff] [review]
Patch
Review of attachment 8469687 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/gmp/GMPPlatform.cpp
@@ +168,5 @@
>
> GMPErr
> SetTimerOnMainThread(GMPTask* aTask, int64_t aTimeoutMS)
> {
> + if (!aTask || !sMainLoop || sMainLoop != MessageLoop::current()) {
comment that this is a "isChildMainThread()" test, or create such a function if you see it being reused
Attachment #8469687 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 3•11 years ago
|
||
I added a IsOnChildMainThread() function:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c4a1b3a2a8b
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•