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

Unified Diff: Source/core/dom/shadow/DistributedNodes.h

Issue 1257573002: Configurable vector capacity in blink::DistributedNodes Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/DistributedNodes.h
diff --git a/Source/core/dom/shadow/DistributedNodes.h b/Source/core/dom/shadow/DistributedNodes.h
index 4259c7e4503724915c6a01744feef01881fd2efc..1601ad8a35ad5a896a4f46c6e6ac83bb8a410cdc 100644
--- a/Source/core/dom/shadow/DistributedNodes.h
+++ b/Source/core/dom/shadow/DistributedNodes.h
@@ -41,6 +41,7 @@ class DistributedNodes final {
DISALLOW_ALLOCATION();
public:
DistributedNodes() { m_nodes.reserveInitialCapacity(32); }
+ explicit DistributedNodes(size_t capacity) { m_nodes.reserveInitialCapacity(capacity); }
PassRefPtrWillBeRawPtr<Node> first() const { return m_nodes.first(); }
PassRefPtrWillBeRawPtr<Node> last() const { return m_nodes.last(); }
« no previous file with comments | « no previous file | Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698