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

Issue 2873503002: NOT YET READY: Improve granularity of window namespaces in Blink.

Created:
3 years, 7 months ago by Łukasz Anforowicz
Modified:
3 years, 6 months ago
Reviewers:
dcheng
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, qsr+mojo_chromium.org, mlamouri+watch-content_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, dglazkov+blink, blink-reviews-api_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, blink-reviews, chromium-apps-reviews_chromium.org, darin (slow to review), kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve granularity of window namespaces in Blink. This CL ensures that blink::FrameTree::Find(const AtomicString& name) only looks for a match in the current set of related browsing contexts (represented in the browser by content::BrowsingInstance). This CL means that window.open's behavior won't change just because a renderer process happens to host multiple unrelated browsing contexts (possible for example after hitting the process limit). This CL consists of 3 parts: - New browser tests. - ProcessManagementTest.ProcessReuseVsBrowsingInstance for verifying browsing instance boundaries when the renderer processes get reused. - ExtensionFunctionalTest.FindingUnrelatedExtensionFramesFromAboutBlank for verifying that extensions can still lookup unrelated frames from the same extension. - Having blink::Page maintain a set of related pages. - Page::next_related_page_ and Page::prev_related_page_ form a circular, double-linked list of related pages. - Page::CreateOrdinary takes a new |opener| parameter and treats the new page and the |opener| as related and puts them on the same list. - |opener| is propagated from content::RenderViewImpl, through blink::WebViewImpl into blink::Page. - Falling back to blink embedder when blink::FrameTree::Find finds no frame with the given name. - The fallback is needed to preserve the old behavior for extensions. - The fallback goes through blink::LocalFrameClient, blink::WebFrameClient / content::RenderFrameImpl, content::ContentRendererClient / ::ChromeContentRendererClient, ::ChromeExtensionsRendererClient and finally is implemented by extensions::ExtensionFrameHelper. - Currently the fallback iterates through all same-origin frames in the given process, but requires that the |relative_to_frame| is an extension frame. Testing via: (all tests below pass before and after the CL, except for ProcessReuseVsBrowsingInstance which is fixed by this CL) - New tests: - ProcessManagementTest::ProcessReuseVsBrowsingInstance (web -> web shouldn't violate browsing instance) - ExtensionFunctionalTest.FindingUnrelatedExtensionFramesFromAboutBlank (extension/about:blank -> extension can violate browsing instance) - Existing tests: - ExtensionApiTest.WindowsCreateVsSiteInstance (chrome.windows.create violates browsing instance in a weird way) - AppBackgroundPageApiTest.Basic (hosted app -> background page can violate browsing instance; tests handling of mapping of web urls [full url, not just origin] to extensions) - Manual testing: - Hangouts *extension* continues to work (sufficient to validate that sign-in works). BUG=718489 TEST=See above.

Patch Set 1 #

Patch Set 2 : Question about OilPan #

Patch Set 3 : . #

Patch Set 4 : Handling extension-specific, cross-browsing-instance lookup. #

Patch Set 5 : Opener-based circular list in blink::Page. #

Patch Set 6 : . #

Patch Set 7 : Rebasing... #

Patch Set 8 : Lookup override should apply only to extension frames. #

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Patch Set 14 : . #

Patch Set 15 : Rebasing... #

Patch Set 16 : Rebasing on top of the other CL. #

Patch Set 17 : Rebasing on top of a fix in the other CL. #

Patch Set 18 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+308 lines, -29 lines) Patch
M chrome/browser/extensions/extension_functional_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +61 lines, -0 lines 0 comments Download
M chrome/browser/extensions/process_management_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +49 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_renderer_client.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_renderer_client.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/browsing_instance.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -6 lines 0 comments Download
M extensions/renderer/extension_frame_helper.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/renderer/extension_frame_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebFactory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/FrameTree.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/page/Page.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +11 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/Page.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +39 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebFactoryImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFactoryImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 72 (71 generated)
Łukasz Anforowicz
3 years, 6 months ago (2017-06-05 22:14:02 UTC) #67
dcheng@, could you PTAL?  I think it is okay to start reviewing this CL, given
that the CL it depends on (https://crrev.com/2921753002 for
https://crbug.com/713888) seems to be supported by others.

Powered by Google App Engine
This is Rietveld 408576698