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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1315543009: Revert of OOPIF: Call setCoreFrame on remote-to-local swaps. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index d80055d58e6bb85dd389f39b7bd16f93590e0121..4b316952f8c3cfc64754fdbec9b4b7ef04991323 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -747,8 +747,7 @@
WebFrame::setOpener(opener);
- // TODO(alexmos,dcheng): This should ASSERT(m_frame) once we no longer have
- // provisional local frames.
+ ASSERT(m_frame);
if (m_frame && m_frame->document())
m_frame->document()->initSecurityContext();
}
@@ -2003,18 +2002,17 @@
// the main frame of the Page. However, this is a provisional frame, and may
// disappear, so Page::m_mainFrame can't be updated just yet.
OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nullptr, SandboxNone);
- RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get());
- frame->setOwner(oldFrame->owner());
- if (frame->owner() && !frame->owner()->isLocal())
- toRemoteBridgeFrameOwner(frame->owner())->setSandboxFlags(static_cast<SandboxFlags>(flags));
- frame->tree().setName(name);
+ m_frame = LocalFrame::create(m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get());
+ m_frame->setOwner(oldFrame->owner());
+ if (m_frame->owner() && !m_frame->owner()->isLocal())
+ toRemoteBridgeFrameOwner(m_frame->owner())->setSandboxFlags(static_cast<SandboxFlags>(flags));
+ m_frame->tree().setName(name);
setParent(oldWebFrame->parent());
setOpener(oldWebFrame->opener());
- setCoreFrame(frame);
// We must call init() after m_frame is assigned because it is referenced
// during init(). Note that this may dispatch JS events; the frame may be
// detached after init() returns.
- frame->init();
+ m_frame->init();
}
void WebLocalFrameImpl::setAutofillClient(WebAutofillClient* autofillClient)
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698