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

Unified Diff: third_party/WebKit/Tools/gdb/webkit.py

Issue 2754473007: Make the gdb Vector pretty-printer work with Python version >= 3. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/gdb/webkit.py
diff --git a/third_party/WebKit/Tools/gdb/webkit.py b/third_party/WebKit/Tools/gdb/webkit.py
index 3aa50535a6bee27c5306513eab310bde19d99d33..53a2a875ea8fbddd610d47c7f1274441e784a76c 100644
--- a/third_party/WebKit/Tools/gdb/webkit.py
+++ b/third_party/WebKit/Tools/gdb/webkit.py
@@ -325,7 +325,7 @@ class WTFVectorPrinter:
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
if self.item == self.finish:
raise StopIteration
count = self.count
@@ -334,6 +334,10 @@ class WTFVectorPrinter:
self.item += 1
return ('[%d]' % count, element)
+ # Python version < 3 compatibility:
+ def next(self):
+ return self.__next__()
+
def __init__(self, val):
self.val = val
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698