Преглед на файлове

Fix missing evaluation context in constructor (#1212)

Gökhan Kurt преди 3 години
родител
ревизия
d3f9f51e2f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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);
 
                     // 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
                         // the function body: