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

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

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 | « LayoutTests/fast/flexbox/order-iterator-crash-expected.txt ('k') | Source/core/rendering/OrderIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/OrderIterator.h
diff --git a/Source/core/rendering/OrderIterator.h b/Source/core/rendering/OrderIterator.h
index 8704078968c6cd215facd2cacd9f4dfe71643039..ad1f795880faf154241d0f3adf5eeeb042c32a50 100644
--- a/Source/core/rendering/OrderIterator.h
+++ b/Source/core/rendering/OrderIterator.h
@@ -61,6 +61,8 @@ public:
RenderBox* next();
void reset();
+ void invalidate();
+
private:
const RenderBox* m_containerBox;
@@ -83,10 +85,7 @@ public:
OrderIteratorPopulator(OrderIterator& iterator)
: m_iterator(iterator)
{
- // 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_iterator.m_orderValues.shrink(0);
- m_iterator.m_orderedValues.clear();
+ m_iterator.invalidate();
}
~OrderIteratorPopulator();
« no previous file with comments | « LayoutTests/fast/flexbox/order-iterator-crash-expected.txt ('k') | Source/core/rendering/OrderIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698