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

Unified Diff: Source/core/dom/Node.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 | « LayoutTests/fast/forms/select-popup-close-no-crash-expected.txt ('k') | Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 04356d0b344fbfe5426e8b81ea019cbf6708687a..4241f1be6d9ff812ee667b4108410dfc1ffae571 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -919,7 +919,11 @@ void Node::detach(const AttachContext& context)
DocumentLifecycle::DetachScope willDetach(document().lifecycle());
#if ENABLE(ASSERT)
- ASSERT(!detachingNode);
+ // The detaching might trigger destruction of a popup menu window,
+ // with ensuing detachment of its Nodes. In a separate document, so
+ // don't assert for these, but do set detachingNode to the most recent
+ // Node being detached.
+ ASSERT(!detachingNode || detachingNode->document() != document());
detachingNode = this;
#endif
« no previous file with comments | « LayoutTests/fast/forms/select-popup-close-no-crash-expected.txt ('k') | Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698