Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 1467133004: Revert of Serve mojo WebUI resources from the same origin as the WebUI itself. (Closed)

Created:
5 years, 1 month ago by magjed_chromium
Modified:
5 years, 1 month ago
Reviewers:
Tom Sepez, Sam McNally, jam, sky
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin (slow to review), James Su, ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 failures in the Linux Tests bot and the Cast Linux bot. content_browsertests: tests WebUIMojoTest.EndToEndPing and WebUIMojoTest.ConnectToApplication. https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests/builds/34758 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 Committed: https://crrev.com/4bd60bd3f2245a06d38ac1dc3dff4bde64be72ae Cr-Commit-Position: refs/heads/master@{#361296}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -70 lines) Patch
M chrome/browser/ui/webui/engagement/site_engagement_ui.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/mojo_web_ui_controller.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/mojo_web_ui_controller.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/omnibox/omnibox_ui.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M content/browser/webui/web_ui_data_source_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/webui/web_ui_data_source_impl.cc View 2 chunks +25 lines, -18 lines 0 comments Download
M content/browser/webui/web_ui_mojo_browsertest.cc View 5 chunks +10 lines, -24 lines 0 comments Download
M content/public/browser/web_ui_data_source.h View 2 chunks +6 lines, -3 lines 0 comments Download
M content/renderer/web_ui_mojo_context_state.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/renderer/web_ui_mojo_context_state.cc View 5 chunks +9 lines, -7 lines 0 comments Download
M content/test/data/web_ui_mojo_shell_test.js View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
magjed_chromium
Created Revert of Serve mojo WebUI resources from the same origin as the WebUI itself.
5 years, 1 month ago (2015-11-24 09:01:04 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1467133004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1467133004/1
5 years, 1 month ago (2015-11-24 09:01:39 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 1 month ago (2015-11-24 09:02:43 UTC) #3
commit-bot: I haz the power
5 years, 1 month ago (2015-11-24 09:03:52 UTC) #4
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/4bd60bd3f2245a06d38ac1dc3dff4bde64be72ae
Cr-Commit-Position: refs/heads/master@{#361296}

Powered by Google App Engine
This is Rietveld 408576698