Deflake external/wpt/fetch/cross-origin-resource-policy/
The network process crashes flakily in these tests on trying to read a file and being blocked: [217947:217958:0403/143350.056670:FATAL:url_loader.cc(1828)] Check failed: response_. #0 0x5604f137b829 base::debug::CollectStackTrace() #1 0x5604f12a3ae3 base::debug::StackTrace::StackTrace() #2 0x5604f12b9174 logging::LogMessage::~LogMessage() #3 0x5604f2afe5d7 network::URLLoader::CompleteBlockedResponse() #4 0x5604f2afcf29 network::URLLoader::OnReceivedRedirect() #5 0x5604f194d027 net::URLRequestJob::NotifyHeadersComplete() #6 0x5604f1950a04 net::URLRequestHttpJob::NotifyHeadersComplete() #7 0x5604f1952ec2 net::URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete() #8 0x5604f1951d28 net::URLRequestHttpJob::OnStartCompleted() #9 0x5604f186697c net::HttpCache::Transaction::DoLoop() #10 0x5604ee97ab9c base::internal::Invoker<>::Run() #11 0x5604f185fae3 net::HttpNetworkTransaction::DoCallback() #12 0x5604f1820853 net::HttpStreamParser::OnIOComplete() #13 0x5604ee97ab9c base::internal::Invoker<>::Run() #14 0x5604f18c8a69 net::TCPClientSocket::DidCompleteRead() #15 0x5604f1983a9c net::TCPSocketPosix::ReadCompleted() #16 0x5604f198526a base::internal::Invoker<>::RunOnce() #17 0x5604f1987137 net::SocketPosix::RetryRead() #18 0x5604f1987eff net::SocketPosix::ReadCompleted() #19 0x5604f1987c28 net::SocketPosix::OnFileCanReadWithoutBlocking() When that happens the StoragePartition's NetworkContext is recreated. WebTestContentBrowserClient was storing the NetworkContext* into a RepeatingCallback against the advice of the method returning it (ie StoragePartition::GetNetworkContext()), and then if the process crashed, the Callback would have a dead pointer bound. This changes the tests to grab the pointer when the callback is run instead. The WebTestClientImpl's cookie_manager_ will still become useless after the network service crashes, but these tests don't depend on that... and WebTestClientImpl is created per-renderer so it should not impact other tests. R=nasko@chromium.org Bug: 1067445 Change-Id: Ieeaca88e5baee9aa3f1bf969c1486503819dcdf8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135424Reviewed-by:Nasko Oskov <nasko@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#756369}
Showing
Please register or sign in to comment