Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp

Issue 1442543003: Oilpan: trace ColorChooserPopupUIController::m_chromeClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leave out unrelated code tidying Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/ColorChooserPopupUIController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
diff --git a/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp b/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
index e790461aece573c0befc753819e71fc983d7e1a9..2d8f22de4f9ddec67b3f7ac55c8d2334ee44c60a 100644
--- a/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
+++ b/third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp
@@ -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();
« no previous file with comments | « third_party/WebKit/Source/web/ColorChooserPopupUIController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698