CID 1374148: Control flow issues (DEADCODE) in GetUserMediaCallbackMediaStreamListener::NotifyChromeOfTrackStops()

RESOLVED DUPLICATE of bug 1312332

Status

()

RESOLVED DUPLICATE of bug 1312332
2 years ago
2 years ago

People

(Reporter: JamesCheng, Assigned: JamesCheng)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
*** CID 1374148:  Control flow issues  (DEADCODE)
/dom/media/MediaManager.cpp: 3640 in mozilla::GetUserMediaCallbackMediaStreamListener::NotifyChromeOfTrackStops()()
3634         return;
3635       }
3636
3637       mAudioStopped |= stopAudio;
3638       mVideoStopped |= stopVideo;
3639
>>>     CID 1374148:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "this->mAudioDevice.get()" inside this statement: "<storage from new>->MediaOp...".
3640       RefPtr<MediaOperationTask> mediaOperation =
3641         new MediaOperationTask(MEDIA_STOP_TRACK,
3642                                this, nullptr, nullptr,
3643                                stopAudio ? mAudioDevice.get() : nullptr,
3644                                stopVideo ? mVideoDevice.get() : nullptr,
3645                                false , mWindowID, nullptr);


Indicating that the mAudioDevice.get() will never be invoked due to stopAudio = false;

But I suspect the statement[1] is a bug.

[1]
http://searchfox.org/mozilla-central/rev/e3e8571c5378ac92663d4f583ccc4ad0a3019716/dom/media/MediaManager.cpp#3631
Comment hidden (mozreview-request)
(Assignee)

Comment 2

2 years ago
Hi Andreas,

Do you think it is a bug by comment 0?
Flags: needinfo?(pehrson)
(Assignee)

Updated

2 years ago
Attachment #8804564 - Flags: review?(jib)
Absolutely right! Though a fix is already on the way :-)
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(pehrson)
Resolution: --- → DUPLICATE
Duplicate of bug: 1312332
(Assignee)

Updated

2 years ago
Attachment #8804564 - Flags: review?(jib)
(Assignee)

Comment 4

2 years ago
Thank you,  cancel the review request!
You need to log in before you can comment on or make changes to this bug.