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

Unified Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 1802953003: RemoteBridgeFrameOwner: keep better track of the attached frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't call virtuals indirectly from a ctor. Created 4 years, 9 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
Index: third_party/WebKit/Source/core/frame/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index e979f6716a0d9fa8d6451eb186c244003be1c169..f89aeca20b0f146cd01e8296a1ac3299a7e5f8b3 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -114,10 +114,9 @@ void Frame::detachChildren()
void Frame::disconnectOwnerElement()
{
if (m_owner) {
- if (m_owner->isLocal())
- toHTMLFrameOwnerElement(m_owner)->clearContentFrame();
+ m_owner->clearContentFrame();
+ m_owner = nullptr;
haraken 2016/03/16 14:17:41 Is there any assert to check that m_owner's conten
dcheng 2016/03/16 16:51:41 Done. I did it in the two "real" FrameOwner implem
}
- m_owner = nullptr;
}
Page* Frame::page() const
@@ -309,12 +308,10 @@ Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
frameCounter().increment();
#endif
- if (m_owner) {
- if (m_owner->isLocal())
- toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
- } else {
+ if (m_owner)
+ m_owner->setContentFrame(*this);
+ else
page()->setMainFrame(this);
- }
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698