Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes for tracebacks

  • Loading branch information...
commit b99995da1ea72c2768ebe2acea13260cc1cf686c 1 parent 62e31c6
Matt Basta authored
2  appvalidator/testcases/javascript/jstypes.py
View
@@ -262,7 +262,7 @@ def __init__(self, elements=None, traverser=None, **kw):
def get(self, traverser, index, instantiate=False):
if index == "length":
- return len(self.elements)
+ return JSLiteral(len(self.elements), traverser=traverser)
# Courtesy of Ian Bicking: http://bit.ly/hxv6qt
try:
4 appvalidator/testcases/javascript/nodedefinitions.py
View
@@ -182,7 +182,7 @@ def ThisExpression(traverser, node):
if not traverser.this_stack:
from predefinedentities import global_identity
return traverser._build_global("window", global_identity)
- return traverser.this_stack[-1]
+ return traverser.this_stack[-1] or JSGlobal(traverser=traverser)
def ArrayExpression(traverser, node):
@@ -424,7 +424,7 @@ def set_lvalue(value):
line=traverser.line,
column=traverser.position,
context=traverser.context)
- return
+ return JSObject(traverser=traverser)
traverser._debug("ASSIGNMENT>>DONE PARSING LEFT")
traverser.debug_level -= 1
1  appvalidator/testcases/javascript/spidermonkey.py
View
@@ -72,7 +72,6 @@ def _get_tree(code, shell=SPIDERMONKEY_INSTALLATION):
if not code:
return None
- # code = JS_ESCAPE.sub("u", unicodehelper.decode(code)).encode("utf_8")
code = json.dumps(JS_ESCAPE.sub("u", unicodehelper.decode(code)))
data = """
2  appvalidator/testcases/javascript/traverser.py
View
@@ -147,6 +147,8 @@ def traverse_node(self, node):
# If there is an action and the action returned a value, it should be
# returned to the node traversal that initiated this node's traversal.
if returns:
+ if not action_result:
+ action_result = JSObject(traverser=self)
node["__traversal"] = action_result
return action_result
Please sign in to comment.
Something went wrong with that request. Please try again.