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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 2050923002: Merge "SELECT popup: Fix a crash by DOM mutation during opening popup." to M52 branch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/fast/forms/select/menulist-popup-mutation-crash.html ('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/core/html/HTMLSelectElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
index 6da2ad4dd50b7bf62fd848db141cf31a8c3d86fd..67bb08c09354bb63a024dfadcdcd636f2ca27cb7 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -2017,6 +2017,10 @@ public:
private:
void call(const HeapVector<Member<MutationRecord>>&, MutationObserver*) override
{
+ // We disconnect the MutationObserver when a popuup is closed. However
+ // MutationObserver can call back after disconnection.
+ if (!m_select->popupIsVisible())
+ return;
m_select->didMutateSubtree();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select/menulist-popup-mutation-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698