Updated error tier before tree is generated; bug 625690

This commit is contained in:
mattbasta 2011-01-20 19:50:13 -05:00
Родитель 89832f6c9d
Коммит bfe5ac85d0
1 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -20,6 +20,12 @@ def test_js_file(err, filename, data, line=0):
err.get_resource("SPIDERMONKEY") is None: # Default value is False
return
before_tier = None
# Set the tier to 4 (Security Tests)
if err is not None:
before_tier = err.tier
err.tier = 4
# Get the AST tree for the JS code
try:
tree = _get_tree(filename,
@ -62,16 +68,16 @@ def test_js_file(err, filename, data, line=0):
import sys
etype, err, tb = sys.exc_info()
raise exc, None, tb
if before_tier:
err.tier = before_tier
return
if tree is None:
if before_tier:
err.tier = before_tier
return None
# Set the tier to 4 (Security Tests)
if err is not None:
before_tier = err.tier
err.tier = 4
context = ContextGenerator(data)
if traverser.DEBUG:
_do_test(err=err, filename=filename, line=line, context=context,