Commit c29f20c8 authored by sigbjornf's avatar sigbjornf Committed by Commit bot

Oilpan: trace ColorChooserPopupUIController::m_chromeClient

R=haraken
BUG=553613

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

Cr-Commit-Position: refs/heads/master@{#361043}
parent ea35a9c6
......@@ -47,17 +47,34 @@ enum ColorPickerPopupAction {
ColorChooserPopupUIController::ColorChooserPopupUIController(LocalFrame* frame, ChromeClientImpl* chromeClient, ColorChooserClient* client)
: ColorChooserUIController(frame, client)
, m_chromeClient(chromeClient)
, m_popup(0)
, m_popup(nullptr)
, m_locale(Locale::defaultLocale())
{
#if ENABLE(OILPAN)
ThreadState::current()->registerPreFinalizer(this);
#endif
}
ColorChooserPopupUIController::~ColorChooserPopupUIController()
{
#if !ENABLE(OILPAN)
closePopup();
#endif
// ~ColorChooserUIController ends the ColorChooser.
}
void ColorChooserPopupUIController::dispose()
{
// Finalized earlier so as to access m_chromeClient while alive.
closePopup();
}
DEFINE_TRACE(ColorChooserPopupUIController)
{
visitor->trace(m_chromeClient);
ColorChooserUIController::trace(visitor);
}
void ColorChooserPopupUIController::openUI()
{
if (m_client->shouldShowSuggestions())
......@@ -76,7 +93,7 @@ void ColorChooserPopupUIController::endChooser()
AXObject* ColorChooserPopupUIController::rootAXObject()
{
return m_popup ? m_popup->rootAXObject() : 0;
return m_popup ? m_popup->rootAXObject() : nullptr;
}
void ColorChooserPopupUIController::writeDocument(SharedBuffer* data)
......@@ -128,7 +145,7 @@ void ColorChooserPopupUIController::setValue(const String& value)
void ColorChooserPopupUIController::didClosePopup()
{
m_popup = 0;
m_popup = nullptr;
if (!m_chooser)
didEndChooser();
......
......@@ -37,7 +37,7 @@ class ColorChooserClient;
class PagePopup;
class ColorChooserPopupUIController final : public ColorChooserUIController, public PagePopupClient {
WILL_BE_USING_PRE_FINALIZER(ColorChooserPopupUIController, dispose);
public:
static PassOwnPtrWillBeRawPtr<ColorChooserPopupUIController> create(LocalFrame* frame, ChromeClientImpl* chromeClient, ColorChooserClient* client)
{
......@@ -45,6 +45,7 @@ public:
}
~ColorChooserPopupUIController() override;
DECLARE_VIRTUAL_TRACE();
// ColorChooserUIController functions:
void openUI() override;
......@@ -67,8 +68,9 @@ private:
ColorChooserPopupUIController(LocalFrame*, ChromeClientImpl*, ColorChooserClient*);
void openPopup();
void dispose();
ChromeClientImpl* m_chromeClient;
RawPtrWillBeMember<ChromeClientImpl> m_chromeClient;
PagePopup* m_popup;
Locale& m_locale;
};
......
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