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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h

Issue 2664403003: [LayoutNG] Stack allocate NGLayoutOpportunityIterator. (Closed)
Patch Set: rebase Created 3 years, 11 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: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
index d0795238b438027abafe9a5a5e8aafcbbf98b330..77344c1db5f1dd1165d73be752fddd065c9be476 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
@@ -18,8 +18,9 @@ namespace blink {
typedef NGLogicalRect NGLayoutOpportunity;
typedef Vector<NGLayoutOpportunity> NGLayoutOpportunities;
-class CORE_EXPORT NGLayoutOpportunityIterator final
- : public GarbageCollectedFinalized<NGLayoutOpportunityIterator> {
+class CORE_EXPORT NGLayoutOpportunityIterator final {
+ STACK_ALLOCATED();
+
public:
// Default constructor.
//
@@ -40,11 +41,6 @@ class CORE_EXPORT NGLayoutOpportunityIterator final
// TODO(chrome-layout-team): Refactor with using C++ <iterator> library.
const NGLayoutOpportunity Next();
- DEFINE_INLINE_VIRTUAL_TRACE() {
- visitor->trace(constraint_space_);
- visitor->trace(opportunity_tree_root_);
- }
-
private:
// Mutable Getters.
NGLayoutOpportunityTreeNode* MutableOpportunityTreeRoot() {
@@ -56,11 +52,11 @@ class CORE_EXPORT NGLayoutOpportunityIterator final
return opportunity_tree_root_.get();
}
- Member<NGConstraintSpace> constraint_space_;
+ Persistent<NGConstraintSpace> constraint_space_;
NGLayoutOpportunities opportunities_;
NGLayoutOpportunities::const_iterator opportunity_iter_;
- Member<NGLayoutOpportunityTreeNode> opportunity_tree_root_;
+ Persistent<NGLayoutOpportunityTreeNode> opportunity_tree_root_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698