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

Unified Diff: Source/core/dom/shadow/ShadowRoot.h

Issue 1265573003: Fix crash on null ptr dereference in EventPath propagation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add another comment 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
Index: Source/core/dom/shadow/ShadowRoot.h
diff --git a/Source/core/dom/shadow/ShadowRoot.h b/Source/core/dom/shadow/ShadowRoot.h
index add60a488592933e33148b90dcfb70cb7630da8a..45f2f6e73c56c9d020ca3cff88619b78b00606e0 100644
--- a/Source/core/dom/shadow/ShadowRoot.h
+++ b/Source/core/dom/shadow/ShadowRoot.h
@@ -70,6 +70,8 @@ public:
using TreeScope::document;
using TreeScope::getElementById;
+ // TODO(kochi): crbug.com/507413 In non-Oilpan, host() may return null during queued
+ // async event handling.
Element* host() const { return toElement(parentOrShadowHostNode()); }
ElementShadow* owner() const { return host() ? host()->shadow() : 0; }

Powered by Google App Engine
This is Rietveld 408576698