| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/frame/RemoteFrame.h" | 6 #include "core/frame/RemoteFrame.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/WindowProxy.h" | 8 #include "bindings/core/v8/WindowProxy.h" |
| 9 #include "bindings/core/v8/WindowProxyManager.h" | 9 #include "bindings/core/v8/WindowProxyManager.h" |
| 10 #include "core/dom/RemoteSecurityContext.h" | 10 #include "core/dom/RemoteSecurityContext.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 { | 89 { |
| 90 PluginScriptForbiddenScope forbidPluginDestructorScripting; | 90 PluginScriptForbiddenScope forbidPluginDestructorScripting; |
| 91 // Frame::detach() requires the caller to keep a reference to this, since | 91 // Frame::detach() requires the caller to keep a reference to this, since |
| 92 // otherwise it may clear the last reference to this, causing it to be | 92 // otherwise it may clear the last reference to this, causing it to be |
| 93 // deleted, which can cause a use-after-free. | 93 // deleted, which can cause a use-after-free. |
| 94 RefPtrWillBeRawPtr<RemoteFrame> protect(this); | 94 RefPtrWillBeRawPtr<RemoteFrame> protect(this); |
| 95 detachChildren(); | 95 detachChildren(); |
| 96 if (!client()) | 96 if (!client()) |
| 97 return; | 97 return; |
| 98 client()->willBeDetached(); | 98 client()->willBeDetached(); |
| 99 m_windowProxyManager->clearForClose(); | 99 m_windowProxyManager->clearWindowProxy(); |
| 100 setView(nullptr); | 100 setView(nullptr); |
| 101 Frame::detach(type); | 101 Frame::detach(type); |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool RemoteFrame::prepareForCommit() | 104 bool RemoteFrame::prepareForCommit() |
| 105 { | 105 { |
| 106 detachChildren(); | 106 detachChildren(); |
| 107 return !!host(); | 107 return !!host(); |
| 108 } | 108 } |
| 109 | 109 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 GraphicsLayer::unregisterContentsLayer(m_remotePlatformLayer); | 172 GraphicsLayer::unregisterContentsLayer(m_remotePlatformLayer); |
| 173 m_remotePlatformLayer = layer; | 173 m_remotePlatformLayer = layer; |
| 174 if (m_remotePlatformLayer) | 174 if (m_remotePlatformLayer) |
| 175 GraphicsLayer::registerContentsLayer(layer); | 175 GraphicsLayer::registerContentsLayer(layer); |
| 176 | 176 |
| 177 ASSERT(owner()); | 177 ASSERT(owner()); |
| 178 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); | 178 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |