| Index: Source/web/WebPluginContainerImpl.h
|
| diff --git a/Source/web/WebPluginContainerImpl.h b/Source/web/WebPluginContainerImpl.h
|
| index 5ff3dcaf5a794f24ed46f98530be968f5bdd365e..19e42f49a6f9d972ea153b2c451b9b0eff46a1ba 100644
|
| --- a/Source/web/WebPluginContainerImpl.h
|
| +++ b/Source/web/WebPluginContainerImpl.h
|
| @@ -54,6 +54,7 @@ class MouseEvent;
|
| class PlatformGestureEvent;
|
| class ResourceError;
|
| class ResourceResponse;
|
| +class ScriptController;
|
| class ScrollbarGroup;
|
| class TouchEvent;
|
| class WebPlugin;
|
| @@ -63,17 +64,12 @@ class WheelEvent;
|
| class Widget;
|
| struct WebPrintParams;
|
|
|
| -class WebPluginContainerImpl FINAL
|
| - : public PluginView
|
| - , public WebPluginContainer
|
| -#if !ENABLE(OILPAN)
|
| - , public FrameDestructionObserver
|
| -#endif
|
| - {
|
| +class WebPluginContainerImpl FINAL : public PluginView, public WebPluginContainer, public FrameDestructionObserver {
|
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebPluginContainerImpl);
|
| public:
|
| - static PassRefPtr<WebPluginContainerImpl> create(HTMLPlugInElement* element, WebPlugin* webPlugin)
|
| + static PassRefPtrWillBeRawPtr<WebPluginContainerImpl> create(HTMLPlugInElement* element, WebPlugin* webPlugin)
|
| {
|
| - return adoptRef(new WebPluginContainerImpl(element, webPlugin));
|
| + return adoptRefWillBeNoop(new WebPluginContainerImpl(element, webPlugin));
|
| }
|
|
|
| // PluginView methods
|
| @@ -169,9 +165,8 @@ public:
|
|
|
| bool paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&);
|
|
|
| -#if ENABLE(OILPAN)
|
| - virtual void detach() OVERRIDE;
|
| -#endif
|
| + virtual void trace(Visitor*) OVERRIDE;
|
| + virtual void dispose() OVERRIDE;
|
|
|
| private:
|
| WebPluginContainerImpl(HTMLPlugInElement*, WebPlugin*);
|
| @@ -198,24 +193,14 @@ private:
|
| const IntRect& frameRect,
|
| Vector<IntRect>& cutOutRects);
|
|
|
| -#if ENABLE(OILPAN)
|
| - // FIXME: Oilpan: consider moving Widget to the heap, allowing this
|
| - // container object to be a FrameDestructionObserver. And thereby
|
| - // keep a traced member reference to the frame rather than as a
|
| - // bare pointer. Instead, the owning object (HTMLFrameOwnerElement)
|
| - // explicitly deletes this object when it is disconnected from its
|
| - // frame. Any access to an invalid frame via this bare pointer
|
| - // is therefore not possible.
|
| + // Oilpan: this is kept as a bare pointer to support renderer-less
|
| + // persisted plugins and their finalization. To handle that
|
| + // step correctly, an untraced reference is kept; see
|
| + // HTMLPlugInElement::m_persistedPluginWidget comment.
|
| //
|
| - // See the HTMLFrameOwnerElement::disconnectContentFrame comment for
|
| - // (even) more.
|
| - LocalFrame* m_frame;
|
| -
|
| - LocalFrame* frame() const { return m_frame; }
|
| -#endif
|
| -
|
| - // FIXME: see above; for the time being, a bare pointer to the owning
|
| - // HTMLPlugInElement and managed as such.
|
| + // Note: using a traced Member<> would create a direct cycle
|
| + // with m_persistedPluginWidget, hence not done. A weak member
|
| + // is an alternative, but it is not unsafe to use a bare pointer.
|
| HTMLPlugInElement* m_element;
|
| WebPlugin* m_webPlugin;
|
| Vector<WebPluginLoadObserver*> m_pluginLoadObservers;
|
|
|