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

Unified Diff: Source/core/events/TreeScopeEventContext.cpp

Issue 865753002: Fix wrong capacity calculation for m_eventPath (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« 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: Source/core/events/TreeScopeEventContext.cpp
diff --git a/Source/core/events/TreeScopeEventContext.cpp b/Source/core/events/TreeScopeEventContext.cpp
index 79ad61ba45eea2ed3218bbeaf5038310a5bce6cb..6f050f9a7a38f45d0bb60dd211de6655fa4b5e22 100644
--- a/Source/core/events/TreeScopeEventContext.cpp
+++ b/Source/core/events/TreeScopeEventContext.cpp
@@ -41,7 +41,7 @@ WillBeHeapVector<RefPtrWillBeMember<EventTarget>>& TreeScopeEventContext::ensure
m_eventPath = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWillBeMember<EventTarget>>());
LocalDOMWindow* window = path.windowEventContext().window();
- m_eventPath->reserveCapacity(path.size() + window ? 1 : 0);
+ m_eventPath->reserveCapacity(path.size() + (window ? 1 : 0));
for (size_t i = 0; i < path.size(); ++i) {
Node& rootNode = path[i].treeScopeEventContext().rootNode();
if (rootNode.isShadowRoot() && toShadowRoot(rootNode).type() == ShadowRoot::AuthorShadowRoot)
« 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