|
@@ -62,7 +62,7 @@ namespace Jint
|
|
|
return key;
|
|
|
}
|
|
|
|
|
|
- private static JsValue TryGetComputedPropertyKey<T>(T expression, Engine engine)
|
|
|
+ internal static JsValue TryGetComputedPropertyKey<T>(T expression, Engine engine)
|
|
|
where T : Expression
|
|
|
{
|
|
|
if (expression.Type is NodeType.Identifier
|
|
@@ -79,8 +79,8 @@ namespace Jint
|
|
|
or NodeType.YieldExpression
|
|
|
or NodeType.TemplateLiteral)
|
|
|
{
|
|
|
- var context = engine._activeEvaluationContext;
|
|
|
- return JintExpression.Build(expression).GetValue(context!);
|
|
|
+ var context = engine._activeEvaluationContext ?? new EvaluationContext(engine);
|
|
|
+ return JintExpression.Build(expression).GetValue(context);
|
|
|
}
|
|
|
|
|
|
return JsValue.Undefined;
|
|
@@ -152,7 +152,7 @@ namespace Jint
|
|
|
internal static bool IsOptional<T>(this T node) where T : Expression
|
|
|
{
|
|
|
return node is IChainElement { Optional: true };
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
|
internal static string LiteralKeyToString(Literal literal)
|
|
@@ -318,7 +318,7 @@ namespace Jint
|
|
|
|
|
|
var runningExecutionContext = engine.ExecutionContext;
|
|
|
var env = runningExecutionContext.LexicalEnvironment;
|
|
|
- var privateEnv= runningExecutionContext.PrivateEnvironment;
|
|
|
+ var privateEnv = runningExecutionContext.PrivateEnvironment;
|
|
|
|
|
|
var prototype = functionPrototype ?? intrinsics.Function.PrototypeObject;
|
|
|
var function = m.Value as IFunction;
|