Updated error tier before tree is generated; bug 625690
This commit is contained in:
Родитель
89832f6c9d
Коммит
bfe5ac85d0
|
@ -20,6 +20,12 @@ def test_js_file(err, filename, data, line=0):
|
||||||
err.get_resource("SPIDERMONKEY") is None: # Default value is False
|
err.get_resource("SPIDERMONKEY") is None: # Default value is False
|
||||||
return
|
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
|
# Get the AST tree for the JS code
|
||||||
try:
|
try:
|
||||||
tree = _get_tree(filename,
|
tree = _get_tree(filename,
|
||||||
|
@ -62,16 +68,16 @@ def test_js_file(err, filename, data, line=0):
|
||||||
import sys
|
import sys
|
||||||
etype, err, tb = sys.exc_info()
|
etype, err, tb = sys.exc_info()
|
||||||
raise exc, None, tb
|
raise exc, None, tb
|
||||||
|
|
||||||
|
if before_tier:
|
||||||
|
err.tier = before_tier
|
||||||
return
|
return
|
||||||
|
|
||||||
if tree is None:
|
if tree is None:
|
||||||
|
if before_tier:
|
||||||
|
err.tier = before_tier
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Set the tier to 4 (Security Tests)
|
|
||||||
if err is not None:
|
|
||||||
before_tier = err.tier
|
|
||||||
err.tier = 4
|
|
||||||
|
|
||||||
context = ContextGenerator(data)
|
context = ContextGenerator(data)
|
||||||
if traverser.DEBUG:
|
if traverser.DEBUG:
|
||||||
_do_test(err=err, filename=filename, line=line, context=context,
|
_do_test(err=err, filename=filename, line=line, context=context,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче