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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Fixing fallout from the new assert in FrameTree.cpp. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 61bddb1d90a0f21c98a8c9f035a2ddaeb3a328f4..8cb0d2b14d29d60ab99bdbd28e9566cff0acf2b9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1380,7 +1380,11 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
GetRenderManager()->Init(site_instance.get(), view_routing_id,
params.main_frame_routing_id,
main_frame_widget_routing_id);
- frame_tree_.root()->SetFrameName(params.main_frame_name);
+
+ // blink::FrameTree::setName uses |name| as the |unique_name| for the main
+ // frame - let's do the same thing here.
+ std::string unique_name = params.main_frame_name;
+ frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);

Powered by Google App Engine
This is Rietveld 408576698