summaryrefslogtreecommitdiffstats
path: root/components/printing
diff options
context:
space:
mode:
authorlukasza <lukasza@chromium.org>2016-02-22 11:26:32 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-22 19:28:15 +0000
commit464d869b9576471215c7e4a25137ac47061ade29 (patch)
tree4cc589d40143e816fd9721df72593c748ff700cb /components/printing
parent4c3ea11423d4ce91dca5dd8e151e59caa0423e13 (diff)
downloadchromium_src-464d869b9576471215c7e4a25137ac47061ade29.zip
chromium_src-464d869b9576471215c7e4a25137ac47061ade29.tar.gz
chromium_src-464d869b9576471215c7e4a25137ac47061ade29.tar.bz2
Replicating WebFrame::uniqueName across renderers.
When a frame is navigated, it might be moved to another renderer process. During such move, the other renderer process will create a local frame object (and the old renderer process will have a remote frame object). It is important that the new local frame object has the same unique name as the frame used to have in the old renderer object. If the unique name is not correctly replicated to the other renderer process, then Layout Tests (i.e. http/tests/security/cross-origin-appcache-allowed.html) fail when run in site isolation mode (i.e. with --additional-drt-flag=--site-per-process flag; note that site isolation mode won't work without extra CLs like crrev.com/1589643003). This CL adds a |unique_name| field to the content::FrameReplicationState struct and plumbs this value from the renderer, through the browser and back to the renderers. BUG=576969 TBR=gene@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1635873003 Cr-Commit-Position: refs/heads/master@{#376772}
Diffstat (limited to 'components/printing')
-rw-r--r--components/printing/renderer/print_web_view_helper.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index 5b4b452..823c957 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -616,8 +616,9 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& name,
- blink::WebSandboxFlags sandboxFlags,
- const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
+ const blink::WebString& unique_name,
+ blink::WebSandboxFlags sandbox_flags,
+ const blink::WebFrameOwnerProperties& frame_owner_properties) override;
void frameDetached(blink::WebFrame* frame, DetachType type) override;
void CallOnReady();
@@ -761,8 +762,9 @@ blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& name,
- blink::WebSandboxFlags sandboxFlags,
- const blink::WebFrameOwnerProperties& frameOwnerProperties) {
+ const blink::WebString& unique_name,
+ blink::WebSandboxFlags sandbox_flags,
+ const blink::WebFrameOwnerProperties& frame_owner_properties) {
blink::WebFrame* frame = blink::WebLocalFrame::create(scope, this);
parent->appendChild(frame);
return frame;