Bug 1633901 - Add support for hiding fix-stacks errors. r=erahm

Differential Revision: https://phabricator.services.mozilla.com/D72958
This commit is contained in:
Nicholas Nethercote 2020-04-28 23:55:57 +00:00
parent a9acbe566f
commit e1d0a44791

View File

@ -21,7 +21,7 @@ line_re = re.compile("#\d+: .+\[.+ \+0x[0-9A-Fa-f]+\]")
fix_stacks = None
def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None):
def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None, hide_errors=False):
global fix_stacks
result = line_re.search(line)
@ -59,7 +59,10 @@ def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None):
args.append('-b')
args.append(breakpadSymsDir + "," + fileid_exe)
fix_stacks = Popen(args, stdin=PIPE, stdout=PIPE, stderr=None)
# Sometimes we need to prevent errors from going to stderr.
stderr = open(os.devnull) if hide_errors else None
fix_stacks = Popen(args, stdin=PIPE, stdout=PIPE, stderr=stderr)
if slowWarning:
print("Initializing stack-fixing for the first stack frame, this may take a while...")