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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1316863009: 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 4b316952f8c3cfc64754fdbec9b4b7ef04991323..599d04b75c39977e8219a8474db86346159868ff 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -747,7 +747,6 @@ void WebLocalFrameImpl::setOpener(WebFrame* opener)
WebFrame::setOpener(opener);
- ASSERT(m_frame);
alexmos 2015/09/03 16:43:38 This is the ASSERT.
dcheng 2015/09/03 16:51:43 (Add a TODO to add this assert back once we don't
alexmos 2015/09/03 16:55:42 Done.
if (m_frame && m_frame->document())
m_frame->document()->initSecurityContext();
}
@@ -2002,17 +2001,18 @@ void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra
// 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);
- 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);
+ 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);
setParent(oldWebFrame->parent());
setOpener(oldWebFrame->opener());
+ setCoreFrame(frame);
alexmos 2015/09/03 16:33:55 I wanted to do this after setting up the tree rela
dcheng 2015/09/03 16:42:09 Which assert is this that you're referring to? I d
alexmos 2015/09/03 16:43:38 The one I removed above in WebLocalFrameImpl::setO
dcheng 2015/09/03 16:51:22 Err, oops. I think it's a /little/ weird to remove
// 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.
- m_frame->init();
+ 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