Commit 6bbdf926 authored by Palak Agarwal's avatar Palak Agarwal Committed by Commit Bot

Fix a null-dereference in the MediaStreamTrack constructor

Bug: 1128167
Change-Id: Ic79945517ee854a18788f08efe1686707086354b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418399
Commit-Queue: Palak Agarwal <agpalak@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808802}
parent 3d95268d
......@@ -259,8 +259,12 @@ MediaStreamTrack::MediaStreamTrack(ExecutionContext* context,
image_capture_ = MakeGarbageCollected<ImageCapture>(
context, this, pan_tilt_zoom_allowed, std::move(callback));
} else {
if (execution_context_) {
execution_context_->GetTaskRunner(TaskType::kInternalMedia)
->PostTask(FROM_HERE, std::move(callback));
} else {
std::move(callback).Run();
}
}
// Note that both 'live' and 'muted' correspond to a 'live' ready state in the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment