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

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

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 | « content/browser/frame_host/frame_tree.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 189694a525dc51e86e5c9788c6815de8ca06b73b..b6202412dc41f9014386aa6ac65cd71ae4227286 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -121,6 +121,8 @@ FrameTree::FrameTree(Navigator* navigator,
}
FrameTree::~FrameTree() {
+ delete root_;
+ root_ = nullptr;
}
FrameTreeNode* FrameTree::FindByID(int frame_tree_node_id) {
@@ -151,7 +153,7 @@ FrameTreeNode* FrameTree::FindByRoutingID(int process_id, int routing_id) {
FrameTreeNode* FrameTree::FindByName(const std::string& name) {
if (name.empty())
- return root_.get();
+ return root_;
FrameTreeNode* node = nullptr;
ForEach(base::Bind(&FrameTreeNodeForName, name, &node));
@@ -167,7 +169,7 @@ void FrameTree::ForEach(
const base::Callback<bool(FrameTreeNode*)>& on_node,
FrameTreeNode* skip_this_subtree) const {
std::queue<FrameTreeNode*> queue;
- queue.push(root_.get());
+ queue.push(root_);
while (!queue.empty()) {
FrameTreeNode* node = queue.front();
@@ -362,7 +364,7 @@ void FrameTree::FrameRemoved(FrameTreeNode* frame) {
// No notification for the root frame.
if (!frame->parent()) {
- CHECK_EQ(frame, root_.get());
+ CHECK_EQ(frame, root_);
return;
}
« no previous file with comments | « content/browser/frame_host/frame_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698