Index: Source/core/dom/shadow/ComposedTreeWalker.h |
diff --git a/Source/core/dom/shadow/ComposedTreeWalker.h b/Source/core/dom/shadow/ComposedTreeWalker.h |
index 9d5ee99d0cf855f97688455ecb795a49db7e0652..81cb1567d9b83d4f1db3c0eb635a450d21d05b6a 100644 |
--- a/Source/core/dom/shadow/ComposedTreeWalker.h |
+++ b/Source/core/dom/shadow/ComposedTreeWalker.h |
@@ -39,6 +39,7 @@ class ShadowRoot; |
// FIXME: Make some functions inline to optimise the performance. |
// https://bugs.webkit.org/show_bug.cgi?id=82702 |
class ComposedTreeWalker { |
+ STACK_ALLOCATED(); |
public: |
typedef NodeRenderingTraversal::ParentDetails ParentTraversalDetails; |
@@ -49,7 +50,7 @@ public: |
ComposedTreeWalker(const Node*, StartPolicy = CannotStartFromShadowBoundary); |
- Node* get() const { return const_cast<Node*>(m_node); } |
+ Node* get() const { return const_cast<Node*>(m_node.get()); } |
void firstChild(); |
void lastChild(); |
@@ -109,7 +110,7 @@ private: |
Node* traverseParentOrHost(const Node*) const; |
- const Node* m_node; |
+ RawPtrWillBeMember<const Node> m_node; |
}; |
inline ComposedTreeWalker::ComposedTreeWalker(const Node* node, StartPolicy startPolicy) |