Commit cc007f73 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Fix null-dereference in X11SoftwareBitmapPresenter::FlushAfterPutImage

|event_task_runner_| may be nullptr when the browser is passed both
--single-process and --disable-gpu, so a null check is needed.

R=msisov

Change-Id: Ic045be1a70dfa98f269f47df7b9ccbb553a181d7
Bug: 1042170
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2004073
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarMaksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#732473}
parent fd3dd4a3
...@@ -185,7 +185,8 @@ void X11SoftwareBitmapPresenter::FlushAfterPutImage() { ...@@ -185,7 +185,8 @@ void X11SoftwareBitmapPresenter::FlushAfterPutImage() {
// blocking since there's no more data to read, so poll() won't wake up until // blocking since there's no more data to read, so poll() won't wake up until
// a new event comes, which may take a long time. Forcing the event loop to // a new event comes, which may take a long time. Forcing the event loop to
// wake up with a dummy event fixes the race condition. // wake up with a dummy event fixes the race condition.
event_task_runner_->PostTask(FROM_HERE, base::BindOnce([] {})); if (event_task_runner_)
event_task_runner_->PostTask(FROM_HERE, base::BindOnce([] {}));
} }
void X11SoftwareBitmapPresenter::Resize(const gfx::Size& pixel_size) { void X11SoftwareBitmapPresenter::Resize(const gfx::Size& pixel_size) {
......
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