Commit 32ea25d2 authored by Eliot Courtney's avatar Eliot Courtney Committed by Commit Bot

Allow nested tasks in TabletMode::Waiter's RunLoop.

If (like in tests), entering tablet mode requires taking a screenshot, we need
to rebuild property trees and submit the copy request to viz. Without
allowing nested tasks, this can't run and we get a deadlock.

Bug: b/139186625
Bug: b/135956156
Test: tast -verbose run dut-4 arc.PIP passes
Change-Id: I4af9836fa562835e6d866015ceeaf47772e4270c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1753783Reviewed-by: default avatarMitsuru Oshima (OOO 8/12,13) <oshima@chromium.org>
Commit-Queue: Eliot Courtney <edcourtney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686725}
parent 9b68a1a2
...@@ -26,7 +26,8 @@ TabletMode::~TabletMode() { ...@@ -26,7 +26,8 @@ TabletMode::~TabletMode() {
g_instance = nullptr; g_instance = nullptr;
} }
TabletMode::Waiter::Waiter(bool enable) : enable_(enable) { TabletMode::Waiter::Waiter(bool enable)
: enable_(enable), run_loop_(base::RunLoop::Type::kNestableTasksAllowed) {
if (TabletMode::Get()->InTabletMode() == enable_) if (TabletMode::Get()->InTabletMode() == enable_)
run_loop_.Quit(); run_loop_.Quit();
else else
......
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