DescriptionImprove 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... #Depends on Patchset: Dependent Patchsets: Messages
Total messages: 72 (71 generated)
|