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

Unified Diff: Source/core/events/EventPath.cpp

Issue 1265573003: Fix crash on null ptr dereference in EventPath propagation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update the comment (not necessarily async events) Created 5 years, 4 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/shadow/ShadowRoot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventPath.cpp
diff --git a/Source/core/events/EventPath.cpp b/Source/core/events/EventPath.cpp
index 7a3c1b5013e7ffa2b6e381345586c1abae9727c9..027ed986e49d249c98ca2ddff26e21561342661d 100644
--- a/Source/core/events/EventPath.cpp
+++ b/Source/core/events/EventPath.cpp
@@ -132,7 +132,16 @@ void EventPath::calculatePath()
if (m_event && shouldStopAtShadowRoot(*m_event, *toShadowRoot(current), *m_node))
break;
current = current->shadowHost();
+#if !ENABLE(OILPAN)
+ // TODO(kochi): crbug.com/507413 This check is necessary when some asynchronous event
+ // is queued while its shadow host is removed and the shadow root gets the event
+ // immediately after it. When Oilpan is enabled, this situation does not happen.
+ // Except this case, shadow root's host is assumed to be non-null.
+ if (current)
+ nodesInPath.append(current);
+#else
nodesInPath.append(current);
+#endif
} else {
current = current->parentNode();
if (current)
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698