Closed Bug 836143 Opened 12 years ago Closed 12 years ago

MediaDecoder should call its own OnDecodeThread for clearer error detection

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: sworkman, Assigned: sworkman)

Details

Attachments

(1 file)

I had an intermittent crash on try (unreproducible locally), in which mDecoderStateMachine was null in MediaDecoder::NotifyBytesConsumed. Specifically, there was an nsCOMPtr crash due to a null mDecoderStateMachine in the MOZ_ASSERT which calls mDecoderStateMachine->OnDecodeThread. The stack trace and error message could have been clearer. Since I can't reproduce it locally, I'd like to change the error checks to be a little more explicit next time. -- MOZ_ASSERT should call MediaDecoder::OnDecodeThread, which has a null check for mDecoderStateMachine right before the call. -- Add an NS_WARN_IF_FALSE to OnDecodeThread to clearly state when mDecoderStateMachine is null. This way, a crash caused by null mDecoderStateMachine will be caught as such, and not via a null nsCOMPtr crash. Note: The rest of the functions in MediaDecoder call MediaDecoder::OnDecodeThread, not mDecoderStateMachine::OnDecodeThread.
Attachment #707922 - Flags: review?(cpearce) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: