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 192318 18d40554e01f
parent 192317 e1174b7947c9
child 192319 ba6d1a086b1a
push id3567
push userryanvm@gmail.com
push date2014-05-20 15:05 +0000
treeherdermozilla-beta@4ffac6a8ab14 [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();
         }