Chromium Code Reviews| Index: content/browser/frame_host/frame_tree.h |
| diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h |
| index 024128807858b54e1635e8582daf558b01ec5d2a..00c89154ecc3870bb93ebbe2d619e0a8af91dd8a 100644 |
| --- a/content/browser/frame_host/frame_tree.h |
| +++ b/content/browser/frame_host/frame_tree.h |
| @@ -51,7 +51,7 @@ class CONTENT_EXPORT FrameTree { |
| RenderFrameHostManager::Delegate* manager_delegate); |
| ~FrameTree(); |
| - FrameTreeNode* root() const { return root_.get(); } |
| + FrameTreeNode* root() const { return root_; } |
| // Returns the FrameTreeNode with the given |frame_tree_node_id| if it is part |
| // of this FrameTree. |
| @@ -180,7 +180,11 @@ class CONTENT_EXPORT FrameTree { |
| // their state is already gone away). |
| RenderViewHostMultiMap render_view_host_pending_shutdown_map_; |
| - scoped_ptr<FrameTreeNode> root_; |
| + // This is an owned ptr to the root frame tree node, which never changes over |
|
nasko
2015/10/05 17:19:30
nit: s/frame tree node/FrameTreeNode/
ncarter (slow)
2015/10/05 17:23:22
Done.
|
| + // the lifetime of the tree. It is not a scoped_ptr because we need the |
| + // pointer to remain valid even while the frame tree node is being destroyed, |
| + // since it's common for a node to test whether it's the root node. |
| + FrameTreeNode* root_; |
| int focused_frame_tree_node_id_; |