Bug 1001569 - Yarr ARM: Free Segments using js_delete to match their allocation with js_new. r=jorendorff, a=sledru
authorDouglas Crosher <dtc-moz@scieneer.com>
Mon, 12 May 2014 21:02:56 +1000
changeset 193343 18d40554e01f0eb129753b6025ce46e91dddfefa
parent 193342 e1174b7947c912c833325f284186796b6823d302
child 193344 ba6d1a086b1a291a5d951c4aff55fee7fbca042d
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff, sledru
bugs1001569
milestone30.0
Bug 1001569 - Yarr ARM: Free Segments using js_delete to match their allocation with js_new. r=jorendorff, a=sledru
js/src/assembler/wtf/SegmentedVector.h
--- a/js/src/assembler/wtf/SegmentedVector.h
+++ b/js/src/assembler/wtf/SegmentedVector.h
@@ -199,17 +199,17 @@ namespace WTF {
         typedef js::Vector<T, SegmentSize ,js::SystemAllocPolicy > Segment;
 
         void deleteAllSegments()
         {
             // Skip the first segment, because it's our inline segment, which was
             // not created by new.
             //for (size_t i = 1; i < m_segments.size(); i++)
             for (size_t i = 1; i < m_segments.length(); i++)
-                delete m_segments[i];
+                js_delete<Segment>(m_segments[i]);
         }
 
         bool segmentExistsFor(size_t index)
         {
             //return index / SegmentSize < m_segments.size();
             return index / SegmentSize < m_segments.length();
         }