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

Issue 2902953003: Revert of Allow headless TabSocket in isolated worlds & remove obsolete logic (Closed)

Created:
3 years, 7 months ago by vitaliii
Modified:
3 years, 7 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Allow headless TabSocket in isolated worlds & remove obsolete logic (patchset #12 id:220001 of https://codereview.chromium.org/2873283002/ ) Reason for revert: This CL breaks compile step. Message: FAILED: obj/headless/headless_browsertests/headless_web_contents_browsertest.obj ninja -t msvc -e environment.x86 -- C:\b\c\goma_client/gomacc.exe "C:\b\depot_tools\win_toolchain\vs_files\d3cb0e37bdd120ad0ac4650b674b09e81be45616\VC\bin\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/headless/headless_browsertests/headless_web_contents_browsertest.obj.rsp /c ../../headless/lib/headless_web_contents_browsertest.cc /Foobj/headless/headless_browsertests/headless_web_contents_browsertest.obj /Fd"obj/headless/headless_browsertests_cc.pdb" c:\b\c\b\win_archive\src\headless\lib\headless_web_contents_browsertest.cc(385) : error C2220: warning treated as error - no 'object' file generated c:\b\c\b\win_archive\src\headless\lib\headless_web_contents_browsertest.cc(533) : error C2220: warning treated as error - no 'object' file generated c:\b\c\b\win_archive\src\headless\lib\headless_web_contents_browsertest.cc(533) : warning C4702: unreachable code c:\b\c\b\win_archive\src\headless\lib\headless_web_contents_browsertest.cc(385) : warning C4702: unreachable code Original issue's description: > Allow headless TabSocket in isolated worlds & remove obsolete logic > > This patch only affects C++ Embedders of headless_lib and should have > no effect on normal chrome even with the --headless flag. > > Recently we decided to no longer allow arbitrary mojo bindings, instead > relying on the headless::TabSocket API for js<-->C++ communications. > > The public headless API for registering a mojo module has already been > removed and this patch finishes the job by removing the code from > MojoBindingsController which injected js mojo bindings for > BINDINGS_POLICY_HEADLESS. > > In this patch we are replacing BINDINGS_POLICY_HEADLESS with > BINDINGS_POLICY_HEADLESS_MAIN_WORLD and > BINDINGS_POLICY_HEADLESS_ISOLATED_WORLD which provide access to the > headless::TabSocket API to either the main world or for isolated worlds > created by the Page.CreateIsolatedWorld DevTools command. > > For a security point of view this patch hopefully reduces the attack > surface for the main world because js now only has access to the > headless::TabSocket API rather than arbitrary mojo modules. Providing > the headless::TabSocket API into isolated worlds is new but hopefully > non-controversial. I note that ContentScripts have access to similar > APIs for communication with the owning extension. I did investigate > reusing that code but it didn't seem feasible. > > BUG=546953 > > Review-Url: https://codereview.chromium.org/2873283002 > Cr-Commit-Position: refs/heads/master@{#474238} > Committed: https://chromium.googlesource.com/chromium/src/+/07ee7c399295b210c5338dfeb543f2d30f748340 TBR=mkwst@chromium.org,jochen@chromium.org,skyostil@chromium.org,alexclarke@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=546953 Review-Url: https://codereview.chromium.org/2902953003 Cr-Commit-Position: refs/heads/master@{#474242} Committed: https://chromium.googlesource.com/chromium/src/+/b8618a1653256d3aae86b64e0c3c4d7c91d207c0

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -450 lines) Patch
M content/public/common/bindings_policy.h View 1 chunk +4 lines, -6 lines 0 comments Download
M content/renderer/mojo_bindings_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/mojo_context_state.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 2 chunks +8 lines, -9 lines 0 comments Download
M headless/BUILD.gn View 3 chunks +1 line, -6 lines 0 comments Download
M headless/lib/browser/headless_browser_context_impl.cc View 2 chunks +17 lines, -0 lines 0 comments Download
M headless/lib/browser/headless_web_contents_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M headless/lib/browser/headless_web_contents_impl.cc View 4 chunks +5 lines, -11 lines 0 comments Download
M headless/lib/headless_web_contents_browsertest.cc View 4 chunks +7 lines, -221 lines 0 comments Download
M headless/lib/renderer/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
M headless/lib/renderer/headless_content_renderer_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M headless/lib/renderer/headless_content_renderer_client.cc View 2 chunks +65 lines, -142 lines 0 comments Download
M headless/public/headless_web_contents.h View 2 chunks +4 lines, -10 lines 0 comments Download
M headless/test/headless_browser_test.h View 1 chunk +2 lines, -6 lines 0 comments Download
M headless/test/headless_browser_test.cc View 3 chunks +3 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/bindings/DOMWrapperWorld.h View 2 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/bindings/DOMWrapperWorld.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
D third_party/WebKit/public/platform/WebIsolatedWorldIds.h View 1 chunk +0 lines, -21 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
vitaliii
Created Revert of Allow headless TabSocket in isolated worlds & remove obsolete logic
3 years, 7 months ago (2017-05-24 10:44:05 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2902953003/1
3 years, 7 months ago (2017-05-24 10:44:18 UTC) #3
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 10:45:11 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/b8618a1653256d3aae86b64e0c3c...

Powered by Google App Engine
This is Rietveld 408576698