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

Unified Diff: Source/core/events/TreeScopeEventContext.h

Issue 794123004: Make TreeScopeEventContext have a RefPtr to TreeScope.rootNode to guard TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Yet another miinimization Created 6 years 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/events/TreeScopeEventContext.h
diff --git a/Source/core/events/TreeScopeEventContext.h b/Source/core/events/TreeScopeEventContext.h
index 3b040eb259d910d245a0aba84cb4333b21cf2f78..b6d018da498630c18bd5753653e1519793b248c7 100644
--- a/Source/core/events/TreeScopeEventContext.h
+++ b/Source/core/events/TreeScopeEventContext.h
@@ -51,6 +51,7 @@ public:
void trace(Visitor*);
TreeScope& treeScope() const { return *m_treeScope; }
+ Node& rootNode() const { return *m_rootNode; }
EventTarget* target() const { return m_target.get(); }
void setTarget(PassRefPtrWillBeRawPtr<EventTarget>);
@@ -78,6 +79,7 @@ private:
#endif
RawPtrWillBeMember<TreeScope> m_treeScope;
+ RefPtrWillBeMember<Node> m_rootNode; // Prevents TreeScope from being freed. TreeScope itself isn't RefCounted.
RefPtrWillBeMember<EventTarget> m_target;
RefPtrWillBeMember<EventTarget> m_relatedTarget;
RefPtrWillBeMember<StaticNodeList> m_eventPath;

Powered by Google App Engine
This is Rietveld 408576698