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

Unified Diff: Source/web/ExternalPopupMenu.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 months 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
Index: Source/web/ExternalPopupMenu.cpp
diff --git a/Source/web/ExternalPopupMenu.cpp b/Source/web/ExternalPopupMenu.cpp
index 49c2e0fca187c748c16a6fc7afef08dc84ecd208..37944028b1cd0f15433b947baab44feddd216cb3 100644
--- a/Source/web/ExternalPopupMenu.cpp
+++ b/Source/web/ExternalPopupMenu.cpp
@@ -60,6 +60,12 @@ ExternalPopupMenu::~ExternalPopupMenu()
{
}
+void ExternalPopupMenu::trace(Visitor* visitor)
+{
+ visitor->trace(m_localFrame);
+ PopupMenu::trace(visitor);
+}
+
void ExternalPopupMenu::show(const FloatQuad& controlPosition, const IntSize&, int index)
{
IntRect rect(controlPosition.enclosingBoundingBox());
@@ -135,7 +141,7 @@ void ExternalPopupMenu::didAcceptIndex(int index)
// derefed. This ensures it does not get deleted while we are running this
// method.
int popupMenuItemIndex = toPopupMenuItemIndex(index, *m_popupMenuClient);
- RefPtr<ExternalPopupMenu> guard(this);
+ RefPtrWillBeRawPtr<ExternalPopupMenu> guard(this);
if (m_popupMenuClient) {
m_popupMenuClient->popupDidHide();
@@ -154,7 +160,7 @@ void ExternalPopupMenu::didAcceptIndices(const WebVector<int>& indices)
// Calling methods on the PopupMenuClient might lead to this object being
// derefed. This ensures it does not get deleted while we are running this
// method.
- RefPtr<ExternalPopupMenu> protect(this);
+ RefPtrWillBeRawPtr<ExternalPopupMenu> protect(this);
if (!indices.size())
m_popupMenuClient->valueChanged(static_cast<unsigned>(-1), true);
@@ -174,7 +180,7 @@ void ExternalPopupMenu::didAcceptIndices(const WebVector<int>& indices)
void ExternalPopupMenu::didCancel()
{
// See comment in didAcceptIndex on why we need this.
- RefPtr<ExternalPopupMenu> guard(this);
+ RefPtrWillBeRawPtr<ExternalPopupMenu> guard(this);
if (m_popupMenuClient)
m_popupMenuClient->popupDidHide();

Powered by Google App Engine
This is Rietveld 408576698