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

Unified Diff: content/browser/frame_host/frame_tree.h

Issue 1380253004: Change scoped_ptr<FrameTreeNode> to FrameTreeNode* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uppercase Created 5 years, 2 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
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..71b11c7acda0fc4f290182ff2acad41d3eec9836 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 FrameTreeNode, which never changes over
+ // the lifetime of the FrameTree. It is not a scoped_ptr because we need the
+ // pointer to remain valid even while the FrameTreeNode 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_;
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698