Commit 7b0f057c authored by tkent@chromium.org's avatar tkent@chromium.org

Oilpan: RenderMenuList should call PopupMenu::disconnectClient in destroy().

PopupMenu::disconnectClient accesses some objects, and they might be destructed
when a RenderMenuList object is garbage collected. We should call
PopupMenu::disconnectClient earlier.

This fixes SelectPopupMenuStyleTest.PopupListBoxRTLRowWidth in Oilpan.

BUG=402439

Review URL: https://codereview.chromium.org/459313002

git-svn-id: svn://svn.chromium.org/blink/trunk@180023 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 94475ae3
...@@ -64,10 +64,16 @@ RenderMenuList::RenderMenuList(Element* element) ...@@ -64,10 +64,16 @@ RenderMenuList::RenderMenuList(Element* element)
} }
RenderMenuList::~RenderMenuList() RenderMenuList::~RenderMenuList()
{
ASSERT(!m_popup);
}
void RenderMenuList::destroy()
{ {
if (m_popup) if (m_popup)
m_popup->disconnectClient(); m_popup->disconnectClient();
m_popup = nullptr; m_popup = nullptr;
RenderFlexibleBox::destroy();
} }
void RenderMenuList::trace(Visitor* visitor) void RenderMenuList::trace(Visitor* visitor)
......
...@@ -39,9 +39,9 @@ class RenderMenuList FINAL : public RenderFlexibleBox, private PopupMenuClient { ...@@ -39,9 +39,9 @@ class RenderMenuList FINAL : public RenderFlexibleBox, private PopupMenuClient {
public: public:
RenderMenuList(Element*); RenderMenuList(Element*);
virtual ~RenderMenuList(); virtual ~RenderMenuList();
virtual void destroy() OVERRIDE;
virtual void trace(Visitor*) OVERRIDE; virtual void trace(Visitor*) OVERRIDE;
public:
bool popupIsVisible() const { return m_popupIsVisible; } bool popupIsVisible() const { return m_popupIsVisible; }
void showPopup(); void showPopup();
void hidePopup(); void hidePopup();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment