| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index 9f8ead4de7efb356d6347ef948bf3893dc96026c..da507d90c1b5b5e6c74513ead9e6c40151a53d30 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -813,8 +813,12 @@ void RenderFrameHostImpl::OnCreateChildFrame(
|
| int new_routing_id,
|
| blink::WebTreeScopeType scope,
|
| const std::string& frame_name,
|
| + const std::string& frame_unique_name,
|
| blink::WebSandboxFlags sandbox_flags,
|
| const blink::WebFrameOwnerProperties& frame_owner_properties) {
|
| + // TODO(lukasza): Call ReceivedBadMessage when |frame_unique_name| is empty.
|
| + DCHECK(!frame_unique_name.empty());
|
| +
|
| // It is possible that while a new RenderFrameHost was committed, the
|
| // RenderFrame corresponding to this host sent an IPC message to create a
|
| // frame and it is delivered after this host is swapped out.
|
| @@ -824,7 +828,7 @@ void RenderFrameHostImpl::OnCreateChildFrame(
|
| return;
|
|
|
| frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(), new_routing_id,
|
| - scope, frame_name, sandbox_flags,
|
| + scope, frame_name, frame_unique_name, sandbox_flags,
|
| frame_owner_properties);
|
| }
|
|
|
| @@ -1411,9 +1415,15 @@ void RenderFrameHostImpl::OnDidChangeOpener(int32_t opener_routing_id) {
|
| GetSiteInstance());
|
| }
|
|
|
| -void RenderFrameHostImpl::OnDidChangeName(const std::string& name) {
|
| +void RenderFrameHostImpl::OnDidChangeName(const std::string& name,
|
| + const std::string& unique_name) {
|
| + if (GetParent() != nullptr) {
|
| + // TODO(lukasza): Call ReceivedBadMessage when |unique_name| is empty.
|
| + DCHECK(!unique_name.empty());
|
| + }
|
| +
|
| std::string old_name = frame_tree_node()->frame_name();
|
| - frame_tree_node()->SetFrameName(name);
|
| + frame_tree_node()->SetFrameName(name, unique_name);
|
| if (old_name.empty() && !name.empty())
|
| frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame();
|
| delegate_->DidChangeName(this, name);
|
|
|