| Index: Source/core/frame/LocalFrame.cpp
|
| diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
|
| index 916523fffbc02f60db2d6863948169a5eb8b607f..db318fc643299abc9fe18e22c20007dcc2a3e84c 100644
|
| --- a/Source/core/frame/LocalFrame.cpp
|
| +++ b/Source/core/frame/LocalFrame.cpp
|
| @@ -48,6 +48,7 @@
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/Settings.h"
|
| #include "core/html/HTMLFrameElementBase.h"
|
| +#include "core/html/HTMLPlugInElement.h"
|
| #include "core/inspector/ConsoleMessageStorage.h"
|
| #include "core/inspector/InspectorInstrumentation.h"
|
| #include "core/loader/FrameLoaderClient.h"
|
| @@ -145,6 +146,7 @@ void LocalFrame::trace(Visitor* visitor)
|
| visitor->trace(m_destructionObservers);
|
| visitor->trace(m_loader);
|
| visitor->trace(m_navigationScheduler);
|
| + visitor->trace(m_view);
|
| visitor->trace(m_pagePopupOwner);
|
| visitor->trace(m_script);
|
| visitor->trace(m_editor);
|
| @@ -153,6 +155,7 @@ void LocalFrame::trace(Visitor* visitor)
|
| visitor->trace(m_eventHandler);
|
| visitor->trace(m_console);
|
| visitor->trace(m_inputMethodController);
|
| + visitor->trace(m_pluginElements);
|
| HeapSupplementable<LocalFrame>::trace(visitor);
|
| #endif
|
| Frame::trace(visitor);
|
| @@ -202,8 +205,9 @@ void LocalFrame::detachView()
|
| m_view->prepareForDetach();
|
| }
|
|
|
| -void LocalFrame::setView(PassRefPtr<FrameView> view)
|
| +void LocalFrame::setView(PassRefPtrWillBeRawPtr<FrameView> view)
|
| {
|
| + ASSERT(!m_view || m_view != view);
|
| detachView();
|
|
|
| // Prepare for destruction now, so any unload event handlers get run and the LocalDOMWindow is
|
| @@ -448,7 +452,7 @@ void LocalFrame::createView(const IntSize& viewportSize, const Color& background
|
|
|
| setView(nullptr);
|
|
|
| - RefPtr<FrameView> frameView;
|
| + RefPtrWillBeRawPtr<FrameView> frameView = nullptr;
|
| if (isLocalRoot) {
|
| frameView = FrameView::create(this, viewportSize);
|
|
|
| @@ -723,6 +727,12 @@ void LocalFrame::disconnectOwnerElement()
|
| if (Document* document = this->document())
|
| document->topDocument().clearAXObjectCache();
|
| #if ENABLE(OILPAN)
|
| + // First give the plugin elements holding persisted,
|
| + // renderer-less the opportunity to dispose of their plugins.
|
| + for (HeapHashSet<WeakMember<HTMLPlugInElement> >::const_iterator it = m_pluginElements.begin(); it != m_pluginElements.end(); ++it)
|
| + (*it)->disconnectContentFrame();
|
| + m_pluginElements.clear();
|
| +
|
| // Clear the FrameView and FrameLoader right here rather than
|
| // during finalization. Too late to access various heap objects
|
| // at that stage.
|
| @@ -747,4 +757,11 @@ void LocalFrame::setPagePopupOwner(Element& owner)
|
| m_pagePopupOwner = &owner;
|
| }
|
|
|
| +#if ENABLE(OILPAN)
|
| +void LocalFrame::registerPluginElement(HTMLPlugInElement* plugin)
|
| +{
|
| + m_pluginElements.add(plugin);
|
| +}
|
| +#endif
|
| +
|
| } // namespace blink
|
|
|