New WebContents created via ctrl-click should be in a new process

Desktop / Chromium - lukasza [chromium.org] - 20 April 2017 19:26 EDT

This CL puts web contents created via ctrl-click (or shift-click, etc.) into a new process (fixing https://crbug.com/23815) and makes sure the new web contents are in a new browsing instance (fixing https://crbug.com/658386 and bringing consistency with the behavior of other browsers).

This CL also adds a test that verifies that the new web contents created by chrome.windows.create API are in the same "browsing instance" as the caller (i.e. that the windows can find and script each other). This is a regression test for https://crbug.com/597750 that was broken by my earlier attempts to fix https://crbug.com/23815 (and AFAICT the regression wasn't caught by existing tests / tryjobs). FWIW, I've also manually tested the Hangouts extension when launching Chrome (built with this CL) with --isolate-extensions flag.

BUG=23815, 597750, 658386 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2686943002 Cr-Commit-Position: refs/heads/master@{#466187}

f206da9 New WebContents created via ctrl-click should be in a new process.
chrome/browser/chrome_navigation_browsertest.cc | 113 +++++++++++++++++++++
chrome/browser/extensions/api/tabs/tabs_api.cc | 9 ++
chrome/browser/extensions/api/tabs/tabs_test.cc | 44 +++++++-
chrome/browser/ui/browser_navigator.cc | 2 +-
chrome/browser/ui/browser_navigator_params.cc | 6 ++
chrome/browser/ui/browser_navigator_params.h | 6 ++
.../frame_tree/anchor_to_same_site_location.html | 22 ++++
content/browser/frame_host/navigator.h | 1 +
content/browser/frame_host/navigator_impl.cc | 3 +
content/browser/frame_host/navigator_impl.h | 1 +
.../browser/frame_host/render_frame_host_impl.cc | 14 ++-
content/browser/security_exploit_browsertest.cc | 2 +-
content/public/browser/page_navigator.cc | 4 +
content/public/browser/page_navigator.h | 6 ++
14 files changed, 229 insertions(+), 4 deletions(-)

Upstream: git.chromium.org


  • Share