statprof: add a couple of asserts to avoid storing unicodes
I don't feel strongly about this change, so it'd be fine to drop it
during review, but it was _extremely_ helpful in drafting the next
change.
Differential Revision: https://phab.mercurial-scm.org/D5209
--- a/mercurial/statprof.py Thu Nov 01 17:09:55 2018 -0400
+++ b/mercurial/statprof.py Thu Nov 01 17:11:31 2018 -0400
@@ -206,8 +206,10 @@
__slots__ = (u'path', u'lineno', u'function', u'source')
def __init__(self, path, lineno, function):
+ assert isinstance(path, bytes)
self.path = path
self.lineno = lineno
+ assert isinstance(function, bytes)
self.function = function
self.source = None