diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-29 17:16:47 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-29 17:16:47 +0000 |
commit | 127f8d6c1ba5701fb5f0e2044cad0e62aa69542f (patch) | |
tree | ffade48c44a9550a88db59f31867ab80a4ebc8f9 /content/browser/webui | |
parent | d38cba0c93e538452c8153b110dfe0b668170c5f (diff) | |
download | chromium_src-127f8d6c1ba5701fb5f0e2044cad0e62aa69542f.zip chromium_src-127f8d6c1ba5701fb5f0e2044cad0e62aa69542f.tar.gz chromium_src-127f8d6c1ba5701fb5f0e2044cad0e62aa69542f.tar.bz2 |
Revert 179347 can't repro this.
> Revert 179271
> > Simplify how TestChromeWebUIControllerFactory is registered now that multiple WebUIControllerFactory instances are supported. Instead of compiling the test code into the shipping product, have tests which use it unregister the default one and register the test one. This also makes the non-test version used for the majority of the test, which keeps the browser_tests more like the shipping product.
> >
> > I've also moved the test harness code to chrome\test\base, which is where test harnesses live.
> >
> > BUG=169170
> > Review URL: https://codereview.chromium.org/12084029
>
> This seems cause a few webui test crashes on Linux ChromiumOS Tests
> (dbg)(2) since http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%282%29/builds/6808
>
> I can reproduce the crash on my local machine with CookiesViewWebUITest.*
> (Note: not all failing tests can be reproduced but this one has a reliable
> reproduce of the crash).
> And after I revert this, the crash gone. I am not sure why chromeos try
> bots have a green run.
>
> The crash is:
> [17690:17690:0128/215636:6223762366:FATAL:web_ui_impl.cc(84)] Check failed: false. Blocked unauthorized use of WebUIBindings.
> [0x7f4eb3da52f0] base::debug::StackTrace::StackTrace()
> [0x7f4eb3dda2a3] logging::LogMessage::~LogMessage()
> [0x7f4eaf52c45b] content::WebUIImpl::OnWebUISend()
> [0x7f4eaf52deaa] DispatchToMethod<>()
> [0x7f4eaf52d823] ViewHostMsg_WebUISend::Dispatch<>()
> [0x7f4eaf52c28c] content::WebUIImpl::OnMessageReceived()
> [0x7f4eaf4fe6e8] content::WebContentsImpl::OnMessageReceived()
> [0x7f4eaf444489] content::RenderViewHostImpl::OnMessageReceived()
> [0x7f4eaf42f031] content::RenderProcessHostImpl::OnMessageReceived()
> [0x7f4eb40109c0] IPC::ChannelProxy::Context::OnDispatchMessage()
> [0x7f4eb4014a8b] base::internal::RunnableAdapter<>::Run()
> [0x7f4eb4014553] base::internal::InvokeHelper<>::MakeItSo()
> [0x7f4eb4013df3] base::internal::Invoker<>::Run()
> [0x7f4eb3d9a0cd] base::Callback<>::Run()
> [0x7f4eb3de0d21] MessageLoop::RunTask()
> [0x7f4eb3de0e3c] MessageLoop::DeferOrRunPendingTask()
> [0x7f4eb3de16cd] MessageLoop::DoWork()
> [0x7f4eb3d7aee7] base::MessagePumpGlib::HandleDispatch()
> [0x7f4eb3d7a557] (anonymous namespace)::WorkSourceDispatch()
> [0x7f4ea3adb9d2] g_main_context_dispatch
> [0x7f4ea3adf858] <unknown>
> [0x7f4ea3adfa0c] g_main_context_iteration
> [0x7f4eb3d7aaf4] base::MessagePumpGlib::RunWithDispatcher()
> [0x7f4eb3d7afc4] base::MessagePumpGlib::Run()
> [0x7f4eb3de0911] MessageLoop::RunInternal()
> [0x7f4eb3de07cc] MessageLoop::RunHandler()
> [0x7f4eb3e197c6] base::RunLoop::Run()
> [0x000003101379] content::RunThisRunLoop()
> [0x000003101306] content::RunMessageLoop()
> [0x000001b66d64] InProcessBrowserTest::QuitBrowsers()
> [0x000001b66c58] InProcessBrowserTest::RunTestOnMainThreadLoop()
> [0x0000030bd6dd] content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
> [0x0000030bdb5b] base::internal::RunnableAdapter<>::Run()
> [0x0000030bdaf1] base::internal::InvokeHelper<>::MakeItSo()
> [0x0000030bdaa9] base::internal::Invoker<>::Run()
> [0x000000775215] base::Callback<>::Run()
> [0x00000333188c] ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
> [0x00000332fe46] ChromeBrowserMainParts::PreMainMessageLoopRun()
> [0x000002c50658] chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun()
> [0x7f4eaf197cba] content::BrowserMainLoop::CreateThreads()
> [0x7f4eaf19b57e] content::BrowserMainRunnerImpl::Initialize()
> [0x7f4eaf1959f7] content::BrowserMain()
> [0x0000030bd662] content::BrowserTestBase::SetUp()
> [0x000001b65e1a] InProcessBrowserTest::SetUp()
> [0x000001c8072b] testing::internal::HandleSehExceptionsInMethodIfSupported<>()
> [0x000001c7de76] testing::internal::HandleExceptionsInMethodIfSupported<>()
> [0x000001c7305d] testing::Test::Run()
> [0x000001c738d6] testing::TestInfo::Run()
> [0x000001c74004] testing::TestCase::Run()
> [0x000001c78faf] testing::internal::UnitTestImpl::RunAllTests()
> [0x000001c81557] testing::internal::HandleSehExceptionsInMethodIfSupported<>()
> [0x000001c7e67d] testing::internal::HandleExceptionsInMethodIfSupported<>()
> [0x000001c77a7e] testing::UnitTest::Run()
> [0x000001b8183c] base::TestSuite::Run()
> [0x000000e6b473] ChromeTestLauncherDelegate::RunTestSuite()
> [0x0000030fd3fc] content::LaunchTests()
> [0x000000e6b315] main
> [0x7f4ea2d7fc4d] __libc_start_main
> [0x00000072fc29] <unknown>
>
> TBR=jam@chromium.org
> Review URL: https://codereview.chromium.org/12089051
TBR=bshe@chromium.org
Review URL: https://codereview.chromium.org/12093047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/webui')
-rw-r--r-- | content/browser/webui/web_ui_controller_factory_registry.cc | 10 | ||||
-rw-r--r-- | content/browser/webui/web_ui_controller_factory_registry.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/content/browser/webui/web_ui_controller_factory_registry.cc b/content/browser/webui/web_ui_controller_factory_registry.cc index 952d044..7040a56 100644 --- a/content/browser/webui/web_ui_controller_factory_registry.cc +++ b/content/browser/webui/web_ui_controller_factory_registry.cc @@ -17,11 +17,7 @@ void WebUIControllerFactory::RegisterFactory(WebUIControllerFactory* factory) { g_factories.Pointer()->push_back(factory); } -WebUIControllerFactoryRegistry* WebUIControllerFactoryRegistry::GetInstance() { - return Singleton<WebUIControllerFactoryRegistry>::get(); -} - -void WebUIControllerFactoryRegistry::UnregisterFactoryForTesting( +void WebUIControllerFactory::UnregisterFactoryForTesting( WebUIControllerFactory* factory) { std::vector<WebUIControllerFactory*>* factories = g_factories.Pointer(); for (size_t i = 0; i < factories->size(); ++i) { @@ -33,6 +29,10 @@ void WebUIControllerFactoryRegistry::UnregisterFactoryForTesting( NOTREACHED() << "Tried to unregister a factory but it wasn't found"; } +WebUIControllerFactoryRegistry* WebUIControllerFactoryRegistry::GetInstance() { + return Singleton<WebUIControllerFactoryRegistry>::get(); +} + WebUIController* WebUIControllerFactoryRegistry::CreateWebUIControllerForURL( WebUI* web_ui, const GURL& url) const { std::vector<WebUIControllerFactory*>* factories = g_factories.Pointer(); diff --git a/content/browser/webui/web_ui_controller_factory_registry.h b/content/browser/webui/web_ui_controller_factory_registry.h index d821783..c2dd9bb 100644 --- a/content/browser/webui/web_ui_controller_factory_registry.h +++ b/content/browser/webui/web_ui_controller_factory_registry.h @@ -17,8 +17,6 @@ class CONTENT_EXPORT WebUIControllerFactoryRegistry public: static WebUIControllerFactoryRegistry* GetInstance(); - static void UnregisterFactoryForTesting(WebUIControllerFactory* factory); - // WebUIControllerFactory implementation. Each method loops through the same // method on all the factories. virtual WebUIController* CreateWebUIControllerForURL( |