Chromium Code Reviews| 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) |