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

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: Updated change after the review's comments 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
« no previous file with comments | « Source/core/rendering/OrderIterator.h ('k') | Source/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+
+ reset();
+}
+
OrderIteratorPopulator::~OrderIteratorPopulator()
{
m_iterator.reset();
« no previous file with comments | « Source/core/rendering/OrderIterator.h ('k') | Source/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698