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

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

Issue 2562323002: Devirtualize Frame::domWindow(). (Closed)
Patch Set: Created 4 years 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/RemoteFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
index 4abb8f84a22cad754e0805663eaaa4a7ec210f14..730c0173cb6fe224b77de40146eb40aaaf9142c1 100644
--- a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
@@ -30,8 +30,9 @@ inline RemoteFrame::RemoteFrame(RemoteFrameClient* client,
FrameOwner* owner)
: Frame(client, host, owner),
m_securityContext(RemoteSecurityContext::create()),
- m_domWindow(RemoteDOMWindow::create(*this)),
- m_windowProxyManager(WindowProxyManager::create(*this)) {}
+ m_windowProxyManager(WindowProxyManager::create(*this)) {
+ m_domWindow = RemoteDOMWindow::create(*this);
+}
RemoteFrame* RemoteFrame::create(RemoteFrameClient* client,
FrameHost* host,
@@ -46,15 +47,10 @@ RemoteFrame::~RemoteFrame() {
DEFINE_TRACE(RemoteFrame) {
visitor->trace(m_view);
visitor->trace(m_securityContext);
- visitor->trace(m_domWindow);
visitor->trace(m_windowProxyManager);
Frame::trace(visitor);
}
-DOMWindow* RemoteFrame::domWindow() const {
- return m_domWindow.get();
-}
-
WindowProxy* RemoteFrame::windowProxy(DOMWrapperWorld& world) {
WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world);
ASSERT(windowProxy);
@@ -155,7 +151,7 @@ void RemoteFrame::setView(RemoteFrameView* view) {
// persistent strong references to RemoteDOMWindow will prevent the GCing
// of all these objects. Break the cycle by notifying of detachment.
if (!m_view)
- m_domWindow->frameDetached();
+ toRemoteDOMWindow(m_domWindow)->frameDetached();
}
void RemoteFrame::createView() {

Powered by Google App Engine
This is Rietveld 408576698