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

Unified Diff: Source/web/PopupMenuImpl.cpp

Issue 920433002: Gracefully handle a disconnected popup menu client on disposing open popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rework test, mac-friendly Created 5 years, 10 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
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PopupMenuImpl.cpp
diff --git a/Source/web/PopupMenuImpl.cpp b/Source/web/PopupMenuImpl.cpp
index a0bc7f3a071538c636edb21991210492a2d31dba..40695b68b55de2c611d95c69a6b4d42226d3ba14 100644
--- a/Source/web/PopupMenuImpl.cpp
+++ b/Source/web/PopupMenuImpl.cpp
@@ -234,11 +234,12 @@ void PopupMenuImpl::setValue(const String& value)
void PopupMenuImpl::didClosePopup()
{
- if (m_indexToSetOnClose >= 0)
+ if (m_client && m_indexToSetOnClose >= 0)
m_client->valueChanged(m_indexToSetOnClose);
m_indexToSetOnClose = -1;
m_popup = nullptr;
- m_client->popupDidHide();
+ if (m_client)
+ m_client->popupDidHide();
}
Element& PopupMenuImpl::ownerElement()
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698