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

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

Issue 2040123002: SELECT popup: Fix a crash by DOM mutation during opening popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 48f220419512dc8ba3bb8e1ef63255ca05d391b6..195dbc2f6b93677706902a854402726d6dbc24d7 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -2015,6 +2015,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