Commit dbb65740 authored by John Abd-El-Malek's avatar John Abd-El-Malek

Add extra thread hops in WebUI code on ChromeOS to simulate old timing.

The removal of the UI->IO thread hop in r768133 seems to cause some tests in the PFQ to flake. Add extra hops (now UI->IO->UI) to avoid flakiness in the PFQ. This should be reverted once the test issue is tracked down.

Bug: 1082298

Change-Id: I64e3e27461a73bf269c8193d9d5c7a65cb3a072a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202671
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769037}
parent 6c3ea475
......@@ -291,8 +291,20 @@ class WebUIURLLoaderFactory : public network::mojom::URLLoaderFactory,
// from frames can happen while the RFH is changed for a cross-process
// navigation. The URLDataSources just need the WebContents; the specific
// frame doesn't matter.
#if defined(OS_CHROMEOS)
// https://crbug.com/1082326 PFQ has test suites that flaked when the thread
// hop to IO thread got eliminated. So add an extra IO->UI thread hop to
// simulate old timing to avoid this flake for now. This should be fixed to
// remove these unnecessary hops.
base::PostTaskAndReply(
FROM_HERE, {BrowserThread::IO}, base::DoNothing(),
base::BindOnce(
&StartURLLoader, request, render_frame_host_->GetFrameTreeNodeId(),
std::move(client), GetStoragePartition()->browser_context()));
#else
StartURLLoader(request, render_frame_host_->GetFrameTreeNodeId(),
std::move(client), GetStoragePartition()->browser_context());
#endif
}
void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver)
......
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