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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc

Issue 2295233002: [layoutng] fix incorrect vector sizing (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
index 7c8e546d99ba3e7126ce8b7dc1ee5248cdbe4cf1..c329866ab446aac1f0d6a3528895a25a294147bb 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
@@ -58,7 +58,8 @@ NGPhysicalFragment* NGFragmentBuilder::ToFragment() {
DCHECK_EQ(offsets_.size(), children_.size());
NGPhysicalSize physical_size = size_.ConvertToPhysical(writing_mode_);
- HeapVector<Member<const NGPhysicalFragmentBase>> children(children_.size());
+ HeapVector<Member<const NGPhysicalFragmentBase>> children;
+ children.reserveCapacity(children_.size());
for (size_t i = 0; i < children_.size(); ++i) {
NGPhysicalFragmentBase* child = children_[i].get();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698