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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h

Issue 2667853006: Have SubframeLoadingDisabler singleton live off-heap. (Closed)
Patch Set: add comment Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 static bool canLoadFrame(HTMLFrameOwnerElement& owner) { 145 static bool canLoadFrame(HTMLFrameOwnerElement& owner) {
146 for (Node* node = &owner; node; node = node->parentOrShadowHostNode()) { 146 for (Node* node = &owner; node; node = node->parentOrShadowHostNode()) {
147 if (disabledSubtreeRoots().contains(node)) 147 if (disabledSubtreeRoots().contains(node))
148 return false; 148 return false;
149 } 149 }
150 return true; 150 return true;
151 } 151 }
152 152
153 private: 153 private:
154 using SubtreeRootSet = HeapHashCountedSet<Member<Node>>; 154 // The use of UntracedMember<Node> is safe as all SubtreeRootSet
155 // references are on the stack and reachable in case a conservative
156 // GC hits.
157 // TODO(sof): go back to HeapHashSet<> once crbug.com/684551 has been
158 // resolved.
159 using SubtreeRootSet = HashCountedSet<UntracedMember<Node>>;
155 160
156 CORE_EXPORT static SubtreeRootSet& disabledSubtreeRoots(); 161 CORE_EXPORT static SubtreeRootSet& disabledSubtreeRoots();
157 162
158 Member<Node> m_root; 163 Member<Node> m_root;
159 }; 164 };
160 165
161 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, 166 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement,
162 FrameOwner, 167 FrameOwner,
163 owner, 168 owner,
164 owner->isLocal(), 169 owner->isLocal(),
165 owner.isLocal()); 170 owner.isLocal());
166 171
167 } // namespace blink 172 } // namespace blink
168 173
169 #endif // HTMLFrameOwnerElement_h 174 #endif // HTMLFrameOwnerElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698