浏览代码

Fix for bug found during running unit tests

auz34 11 年之前
父节点
当前提交
5e98352a67
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jint/Runtime/ExpressionIntepreter.cs

+ 1 - 1
Jint/Runtime/ExpressionIntepreter.cs

@@ -797,7 +797,7 @@ namespace Jint.Runtime
             var func = _engine.GetValue(callee);
             
             var r = callee as Reference;
-            var stackItem = new Tuple<CallExpression, JsValue, string>(callExpression, func, r.GetReferencedName());
+            var stackItem = new Tuple<CallExpression, JsValue, string>(callExpression, func, r != null ? r.GetReferencedName() : "anonymous function");
 
             var recursionDepth = _engine.CallStack.Count(ce => ce.Item1 == callExpression || ce.Item2 == func);