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

Unified Diff: Source/core/rendering/OrderIterator.cpp

Issue 19558006: Heap-use-after-free in WebCore::RenderFlexibleBox::firstLineBoxBaseline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed bad FINAL Created 7 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
Index: Source/core/rendering/OrderIterator.cpp
diff --git a/Source/core/rendering/OrderIterator.cpp b/Source/core/rendering/OrderIterator.cpp
index 1bc7bc2929cc8cbb0718a96ca7f6fd928df9e97d..4d19918af38086bd604155b6e83958c720fa03b2 100644
--- a/Source/core/rendering/OrderIterator.cpp
+++ b/Source/core/rendering/OrderIterator.cpp
@@ -74,6 +74,16 @@ void OrderIterator::reset()
m_currentChild = 0;
}
+void OrderIterator::invalidate()
+{
+ // Note that we don't release the memory here, we only invalidate the size.
+ // This avoids unneeded reallocation if the size ends up not changing.
+ m_orderValues.shrink(0);
+ m_orderedValues.clear();
ojan 2013/07/19 20:27:50 Nit: can't we also do m_orderedValues.shrink(0)?
Julien - ping for review 2013/07/19 20:52:31 It should be possible indeed.
Julien - ping for review 2013/07/19 21:25:44 I have to retract that: m_orderedValues is a HashM
+
+ reset();
+}
+
OrderIteratorPopulator::~OrderIteratorPopulator()
{
m_iterator.reset();

Powered by Google App Engine
This is Rietveld 408576698