Revert of Serve mojo WebUI resources from the same origin as the WebUI itself....
Revert of Serve mojo WebUI resources from the same origin as the WebUI itself. (patchset #2 id:20001 of https://codereview.chromium.org/1457623004/ ) Reason for revert: Causing test failures in the Cast Linux bot, content_browsertests, tests WebUIMojoTest.EndToEndPing and WebUIMojoTest.ConnectToApplication. https://build.chromium.org/p/chromium.linux/builders/Cast%20Linux/builds/13153/steps/content_browsertests Stack trace: [ RUN ] WebUIMojoTest.ConnectToApplication [8517:8517:1124/000407:287044551:FATAL:web_ui_mojo_browsertest.cc(71)] Check failed: base::ReadFileToString(path, &contents, std::string::npos). web_ui_mojo_shell_test.html #0 0x000000b4fa0e base::debug::StackTrace::StackTrace() #1 0x000000b5bbeb logging::LogMessage::~LogMessage() #2 0x0000006d96a7 content::(anonymous namespace)::GetResource() #3 0x000002f21749 content::WebUIDataSourceImpl::StartDataRequest() #4 0x000002f1fb9f content::URLDataManagerBackend::CallStartRequest() #5 0x000002f20588 _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIPFv13scoped_refptrIN7content17URLDataSourceImplEERKSsiiiEEENS0_8TypeListIJPS5_S8_RKiSF_SF_EEEE8MakeItSoESB_SD_S8_SF_SF_SF_ #6 0x000000ba8a3d base::debug::TaskAnnotator::RunTask() #7 0x000000b6091b base::MessageLoop::RunTask() #8 0x000000b60c29 base::MessageLoop::DeferOrRunPendingTask() #9 0x000000b60dfd base::MessageLoop::DoWork() #10 0x000000b48e89 base::MessagePumpLibevent::Run() #11 0x000000b6e600 base::RunLoop::Run() #12 0x0000009b669c content::RunThisRunLoop() #13 0x00000095d853 content::NavigateToURL() #14 0x0000006d9f68 content::(anonymous namespace)::WebUIMojoTest_ConnectToApplication_Test::RunTestOnMainThread() #15 0x00000095d2c5 content::ContentBrowserTest::RunTestOnMainThreadLoop() #16 0x0000009a7a9a content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #17 0x00000099f86e content::ShellBrowserMainParts::PreMainMessageLoopRun() #18 0x000002d9b015 content::BrowserMainLoop::PreMainMessageLoopRun() #19 0x000002ee8397 content::StartupTaskRunner::RunAllTasksNow() #20 0x000002d991ea content::BrowserMainLoop::CreateStartupTasks() #21 0x000002d9dc96 content::BrowserMainRunnerImpl::Initialize() #22 0x00000097e635 ShellBrowserMain() #23 0x000000978af2 content::ShellMainDelegate::RunProcess() #24 0x000002d73ea2 content::RunNamedProcessTypeMain() #25 0x000002d74731 content::ContentMainRunnerImpl::Run() #26 0x000002d73610 content::ContentMain() #27 0x0000009a75ea content::BrowserTestBase::SetUp() #28 0x00000095d1b3 content::ContentBrowserTest::SetUp() #29 0x000000ac41b8 testing::Test::Run() #30 0x000000ac517a testing::TestInfo::Run() #31 0x000000ac5613 testing::TestCase::Run() #32 0x000000acc9d9 testing::internal::UnitTestImpl::RunAllTests() #33 0x000000acc67e testing::UnitTest::Run() #34 0x0000009c9dc1 base::TestSuite::Run() #35 0x0000009603d6 content::ContentTestLauncherDelegate::RunTestSuite() #36 0x0000009b2806 content::LaunchTests() #37 0x000000960383 main #38 0x7f964b45cec5 __libc_start_main #39 0x000000459519 <unknown> Original issue's description: > Serve mojo WebUI resources from the same origin as the WebUI itself. > > Currently, mojo resources are served from chrome://mojo and each mojo > WebUI controller replaces the WebUIDataSource for that origin with one > containing the resource it needs on construction. If a WebUI page's > controller (or an equivalent one) was not the last one to be > constructed, any requests for mojo bindings for its mojo interfaces > will fail. This change fixes this problem by serving the mojo resources > from the same origin as the WebUI itself. > > BUG=557540 > > Committed: https://crrev.com/7e10653acb8254226f9b3ca5e0233c298c2ffbc3 > Cr-Commit-Position: refs/heads/master@{#361275} TBR=sky@chromium.org,jam@chromium.org,tsepez@chromium.org,sammc@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=557540 Review URL: https://codereview.chromium.org/1467133004 Cr-Commit-Position: refs/heads/master@{#361296}
Showing
Please register or sign in to comment