Explorar o código

Fix missing evaluation context in constructor (#1212)

Gökhan Kurt %!s(int64=3) %!d(string=hai) anos
pai
achega
d3f9f51e2f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Jint/Native/Function/ScriptFunctionInstance.cs

+ 1 - 1
Jint/Native/Function/ScriptFunctionInstance.cs

@@ -146,7 +146,7 @@ namespace Jint.Native.Function
                     var result = OrdinaryCallEvaluateBody(context, arguments);
                     var result = OrdinaryCallEvaluateBody(context, arguments);
 
 
                     // The DebugHandler needs the current execution context before the return for stepping through the return point
                     // The DebugHandler needs the current execution context before the return for stepping through the return point
-                    if (_engine._activeEvaluationContext.DebugMode && result.Type != CompletionType.Throw)
+                    if (context.DebugMode && result.Type != CompletionType.Throw)
                     {
                     {
                         // We don't have a statement, but we still need a Location for debuggers. DebugHandler will infer one from
                         // We don't have a statement, but we still need a Location for debuggers. DebugHandler will infer one from
                         // the function body:
                         // the function body: