| Index: third_party/WebKit/Source/core/page/FrameTree.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/FrameTree.cpp b/third_party/WebKit/Source/core/page/FrameTree.cpp
|
| index a6e5e4861457e422295d263518b75c8b2e9492b8..8edafc960d441a877eefb63149f1152523c599c4 100644
|
| --- a/third_party/WebKit/Source/core/page/FrameTree.cpp
|
| +++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
|
| @@ -75,14 +75,14 @@ Frame* FrameTree::Parent() const {
|
| return this_frame_->Client()->Parent();
|
| }
|
|
|
| -Frame* FrameTree::Top() const {
|
| +Frame& FrameTree::Top() const {
|
| // FIXME: top() should never return null, so here are some hacks to deal
|
| // with EmptyLocalFrameClient and cases where the frame is detached
|
| // already...
|
| if (!this_frame_->Client())
|
| - return this_frame_;
|
| + return *this_frame_;
|
| Frame* candidate = this_frame_->Client()->Top();
|
| - return candidate ? candidate : this_frame_.Get();
|
| + return candidate ? *candidate : *this_frame_;
|
| }
|
|
|
| Frame* FrameTree::NextSibling() const {
|
| @@ -154,7 +154,7 @@ Frame* FrameTree::Find(const AtomicString& name) const {
|
| return this_frame_;
|
|
|
| if (EqualIgnoringASCIICase(name, "_top"))
|
| - return Top();
|
| + return &Top();
|
|
|
| if (EqualIgnoringASCIICase(name, "_parent"))
|
| return Parent() ? Parent() : this_frame_.Get();
|
|
|