Procházet zdrojové kódy

Fix missing evaluation context in constructor (#1212)

Gökhan Kurt před 3 roky
rodič
revize
d3f9f51e2f
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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: