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

Unified Diff: Source/core/css/StylePropertySet.cpp

Issue 234823004: Heap-use-after-free in WebCore::MutableStylePropertySet::setProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/css/StylePropertySet.cpp
diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp
index 93a86b94b5a0f1bd0bc84018391f16254f8d38af..b667894ef316328d0f51eb4dd99d54a19cf235b4 100644
--- a/Source/core/css/StylePropertySet.cpp
+++ b/Source/core/css/StylePropertySet.cpp
@@ -457,7 +457,7 @@ bool MutableStylePropertySet::removePropertiesInSet(const CSSPropertyID* set, un
if (m_propertyVector.isEmpty())
return false;
- WillBeHeapVector<CSSProperty, 4> newProperties;
+ WillBeHeapVector<CSSProperty> newProperties;
newProperties.reserveInitialCapacity(m_propertyVector.size());
unsigned initialSize = m_propertyVector.size();
@@ -470,7 +470,7 @@ bool MutableStylePropertySet::removePropertiesInSet(const CSSPropertyID* set, un
newProperties.append(property);
}
- m_propertyVector.swap(newProperties);
+ m_propertyVector = newProperties;
return initialSize != m_propertyVector.size();
}
« 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