Chromium Code Reviews| Index: Source/core/html/HTMLFrameOwnerElement.h |
| diff --git a/Source/core/html/HTMLFrameOwnerElement.h b/Source/core/html/HTMLFrameOwnerElement.h |
| index 17fb797adbc6f197aee5af03e8aae248a6c18069..8c68dc0832bf2c36fbe342111b6b961d67bfd42f 100644 |
| --- a/Source/core/html/HTMLFrameOwnerElement.h |
| +++ b/Source/core/html/HTMLFrameOwnerElement.h |
| @@ -81,8 +81,9 @@ inline Result<HTMLFrameOwnerElement> toFrameOwnerElement(const Handle<Node>& nod |
| } |
| class SubframeLoadingDisabler { |
| + DISALLOW_ALLOCATION() |
| public: |
| - explicit SubframeLoadingDisabler(Node* root) |
| + explicit SubframeLoadingDisabler(const Handle<Node>& root) |
| : m_root(root) |
| { |
| disabledSubtreeRoots().add(m_root); |
| @@ -95,7 +96,8 @@ public: |
| static bool canLoadFrame(const Handle<HTMLFrameOwnerElement>& owner) |
| { |
| - for (Node* node = owner.raw(); node; node = node->parentOrShadowHostNode().handle().raw()) { |
| + for (Handle<Node> node = owner; node; node = node->parentOrShadowHostNode()) { |
| + HandleScope scope; |
| if (disabledSubtreeRoots().contains(node)) |
| return false; |
| } |
| @@ -103,13 +105,14 @@ public: |
| } |
| private: |
| - static HashSet<Node*>& disabledSubtreeRoots() |
| + static HashSet<Member<Node> >& disabledSubtreeRoots() |
| { |
| - DEFINE_STATIC_LOCAL(HashSet<Node*>, nodes, ()); |
| + // All nodes in the collection are traced individually (via m_root). |
|
haraken
2013/09/12 20:08:14
This observation looks correct, but it's a bit fra
|
| + DEFINE_STATIC_LOCAL(HashSet<Member<Node> >, nodes, ()); |
| return nodes; |
| } |
| - Node* m_root; |
| + Handle<Node> m_root; |
| }; |
| } // namespace WebCore |