Closed Bug 1061447 Opened 7 years ago Closed 7 years ago

Fix error handling in ChannelMediaResource::RecreateChannel()

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(1 file)

http://hg.mozilla.org/mozilla-central/file/532b5fb77ba1/content/media/MediaResource.cpp#l933

mChannel could become null if NS_NewChannel fails and |mChannel->SetContentType| below will crash. Though it is kinda unlikely to happen, lets add some error handling to keep the code in good shape.
Bail out if NS_NewChannel() fails to create a channel.
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Attachment #8482532 - Flags: review?(roc)
Since it is a simple change, I will save the Try.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c3991b2377ab
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.