Commit fce2a2de authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Use CrossThreadBindOnce in HtmlVideoElementCapturerSource::sendNewFrame

... when posting tasks. A task posted runs once, so
CrossThreadBindRepeating is not strictly correct.

This is now possible, after [1].

[1] crrev.com/c/1750043

BUG=964922
R=jbroman@chromium.org

Change-Id: Ic3a7cf2fbcd6c07b92efaeab206e45a0cd1e418f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752077
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686615}
parent d6c4a0cf
...@@ -192,12 +192,9 @@ void HtmlVideoElementCapturerSource::sendNewFrame() { ...@@ -192,12 +192,9 @@ void HtmlVideoElementCapturerSource::sendNewFrame() {
// Post with CrossThreadBind here, instead of CrossThreadBindOnce, // Post with CrossThreadBind here, instead of CrossThreadBindOnce,
// otherwise the |new_frame_callback_| ivar can be nulled out // otherwise the |new_frame_callback_| ivar can be nulled out
// unintentionally. // unintentionally.
//
// TODO(crbug.com/964922): Consider cloning |new_frame_callback_|
// and use CrossThreadBind
PostCrossThreadTask( PostCrossThreadTask(
*io_task_runner_, FROM_HERE, *io_task_runner_, FROM_HERE,
CrossThreadBindRepeating(new_frame_callback_, frame, current_time)); CrossThreadBindOnce(new_frame_callback_, frame, current_time));
} }
// Calculate the time in the future where the next frame should be created. // Calculate the time in the future where the next frame should be created.
......
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