Chromium Code Reviews| Index: content/browser/frame_host/frame_tree.cc |
| diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc |
| index 4dcf54140956a2165fbd03bba4f3a24a52f38584..9e054eb70ab0376f86d59d63f10b725e54488803 100644 |
| --- a/content/browser/frame_host/frame_tree.cc |
| +++ b/content/browser/frame_host/frame_tree.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/lazy_instance.h" |
| #include "base/memory/ptr_util.h" |
| #include "content/browser/frame_host/frame_tree_node.h" |
| +#include "content/browser/frame_host/navigation_entry_impl.h" |
|
Charlie Reis
2016/07/27 22:48:27
I suppose we should include NavigationController a
nasko
2016/07/29 15:52:19
Acknowledged.
|
| #include "content/browser/frame_host/navigator.h" |
| #include "content/browser/frame_host/render_frame_host_factory.h" |
| #include "content/browser/frame_host/render_frame_host_impl.h" |
| @@ -184,6 +185,14 @@ bool FrameTree::AddFrame(FrameTreeNode* parent, |
| if (parent->current_frame_host()->GetProcess()->GetID() != process_id) |
| return false; |
| + // If the last committed NavigationEntry has FrameNavigationEntry with the |
| + // same |frame_unique_name|, it has to be removed to avoid conflicts with |
| + // future updates. |
|
Charlie Reis
2016/07/27 22:48:27
Let's clarify a bit how this is an expected case:
nasko
2016/07/29 15:52:19
Done.
|
| + NavigationEntryImpl* last_committed_entry = static_cast<NavigationEntryImpl*>( |
| + root_->navigator()->GetController()->GetLastCommittedEntry()); |
|
Charlie Reis
2016/07/27 22:48:27
This should be parent->navigator() to be consisten
nasko
2016/07/29 15:52:19
Done.
|
| + if (last_committed_entry) |
| + last_committed_entry->ClearNamedFrameEntries(frame_unique_name); |
| + |
| // AddChild is what creates the RenderFrameHost. |
| FrameTreeNode* added_node = parent->AddChild( |
| base::WrapUnique(new FrameTreeNode( |