diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-12 10:07:28 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-12 10:07:28 +0000 |
commit | eabfe191cb87c254770b64981e675a1805c78444 (patch) | |
tree | 06d87f3030b93ee7967270e712e986d35b843377 /content/browser/frame_host/navigation_controller_impl.cc | |
parent | 42db8ec110f31892a87c47371c4095a790d4f245 (diff) | |
download | chromium_src-eabfe191cb87c254770b64981e675a1805c78444.zip chromium_src-eabfe191cb87c254770b64981e675a1805c78444.tar.gz chromium_src-eabfe191cb87c254770b64981e675a1805c78444.tar.bz2 |
Fixed flakiness of context_lost tests on GPU bots.
Two failures were observed:
1. If the GPU process crashed between EstablishGpuChannel and
CreateViewCommandBuffer, the channel would never be properly marked
as lost. Now, if CreateViewCommandBuffer fails, mark the
GpuChannelHost as lost on the renderer side. The RenderThreadImpl
will then establish a new connection to the new GPU process.
2. In Issue 308675, support was added to allow Telemetry to navigate
to about:gpucrash, specifically for this test. It turns out that
each navigation from Telemetry was provoking *two* GPU process
crashes. Depending on when they came in, the test would
intermittently receive two lost context events and fail. Squelch
the second debug URL handling in NavigationControllerImpl.
These fix the locally reproducible failures of this test.
BUG=365904
TEST=src/content/test/gpu/run_gpu_test.py context_lost --browser=debug --show-stdout -v --page-filter=WebGLContextLostFromGPUProcessExit --page-repeat=30
Review URL: https://codereview.chromium.org/277113002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/frame_host/navigation_controller_impl.cc')
-rw-r--r-- | content/browser/frame_host/navigation_controller_impl.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc index 79e2c7b..601f9a2 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -5,12 +5,14 @@ #include "content/browser/frame_host/navigation_controller_impl.h" #include "base/bind.h" +#include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" // Temporary #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "cc/base/switches.h" #include "content/browser/browser_url_handler_impl.h" #include "content/browser/dom_storage/dom_storage_context_wrapper.h" #include "content/browser/dom_storage/session_storage_namespace_impl.h" @@ -1012,8 +1014,18 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( // update the virtual URL when replaceState is called after a pushState. GURL url = params.url; bool needs_update = false; - BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary( - &url, browser_context_, &needs_update); + // We call RewriteURLIfNecessary twice: once when page navigation + // begins in CreateNavigationEntry, and once here when it commits. + // With the kEnableGpuBenchmarking flag, the rewriting includes + // handling debug URLs which cause an action to occur, and thus we + // should not rewrite them a second time. + bool skip_rewrite = + IsDebugURL(url) && base::CommandLine::ForCurrentProcess()->HasSwitch( + cc::switches::kEnableGpuBenchmarking); + if (!skip_rewrite) { + BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary( + &url, browser_context_, &needs_update); + } new_entry->set_update_virtual_url_with_url(needs_update); // When navigating to a new page, give the browser URL handler a chance to |