Closed Bug 1238462 Opened 9 years ago Closed 6 years ago

[emulator-x86-kk][mochitest] TEST-UNEXPECTED-FAIL | dom/media/test/test_playback.html | small-shot.m4a duration (NaN) should be around 0.29

Categories

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

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: hsinyi, Unassigned)

References

Details

Blocks: 1192121
Priority: -- → P2
The small-shot.m4a duration is assigned |MediaDecoderStateMachine::OnMetadataRead|, then send metadataload event to main thread. I suspect there is a racing between "set mDuration" and "MediaDecoderStateMachine::EnqueueLoadedMetadataEvent". 1. The "set mDuration" is a Canonical, so it will dispatch a task(DoNotify) to self then dispatch to main thread. 2. "MediaDecoderStateMachine::EnqueueLoadedMetadataEvent" seems dispatch to main thread directly. So the "metadataload event" is before than "mirror value update" in main thread. Once the "metadataload event" comes first, the HtmlMediaElement fires the async event "loadedmetadata" to js get the NaN duration. JW, how do you think?
Flags: needinfo?(jwwang)
https://hg.mozilla.org/mozilla-central/file/f59d1f7941b0b7358d6fa28179d60280ac2844b9/dom/media/MediaDecoder.cpp#l745 AbstractThread::MainThread() is assigned as the target thread when MediaDecoder registers a listener with the event source. Tail dispatching should kick when the event is published and sent to the listener. You can run a debugger to make sure tail dispatching is activated.
Flags: needinfo?(jwwang)
(In reply to JW Wang [:jwwang] from comment #2) > https://hg.mozilla.org/mozilla-central/file/ > f59d1f7941b0b7358d6fa28179d60280ac2844b9/dom/media/MediaDecoder.cpp#l745 > > AbstractThread::MainThread() is assigned as the target thread when > MediaDecoder registers a listener with the event source. Tail dispatching > should kick when the event is published and sent to the listener. > > You can run a debugger to make sure tail dispatching is activated. https://dxr.mozilla.org/mozilla-central/source/xpcom/threads/StateMirroring.h#195 My point is that since the set function in canonical doesn't dispatch task to mainthread(mirror) directly. So the loadedmetadata event will run before updateValue? If so, may cause the problem.
Direct tasks should run before tail dispatching.
Mass change P2 -> P3
Priority: P2 → P3

The project was canceled. Marked this as wontfix.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.