Bug 1642044 - Python 3 tools/rb/find_leakers.py r=gbrown
authorBob Clary <bclary@bclary.com>
Mon, 01 Jun 2020 23:14:30 +0000
changeset 597600 2da7ae90fbf021486111eed08a36e361cdaab3a0
parent 597599 e650aaef268c09419ada9611bec4b985f5b21841
child 597601 f965f78cedf7567b0dabff11c6edbf0fd485b3b0
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1642044
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1642044 - Python 3 tools/rb/find_leakers.py r=gbrown Differential Revision: https://phabricator.services.mozilla.com/D77660
tools/rb/find_leakers.py
--- a/tools/rb/find_leakers.py
+++ b/tools/rb/find_leakers.py
@@ -8,21 +8,23 @@
 # It simply goes through the log, finds `AddRef' or `Ctor' lines, and then
 # sees if they `Release' or `Dtor'. If not, it reports them as leaks.
 # Please see README file in the same directory.
 
 from __future__ import absolute_import, print_function
 
 import sys
 
+import six
+
 
 def print_output(allocation, obj_to_class):
     '''Formats and prints output.'''
     items = []
-    for obj, count, in allocation.iteritems():
+    for obj, count, in six.iteritems(allocation):
         # Adding items to a list, so we can sort them.
         items.append((obj, count))
     # Sorting by count.
     items.sort(key=lambda item: item[1])
 
     for obj, count, in items:
         print("{obj} ({count}) @ {class_name}".format(obj=obj,
                                                       count=count,