LibJS: Add a couple of missing spec steps to PerformEval
I missed these in 34f902fb52
.
This commit is contained in:
parent
77ba3d3e3f
commit
ee6fb51db6
Notes:
sideshowbarker
2024-07-17 16:42:19 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/ee6fb51db6 Pull-request: https://github.com/SerenityOS/serenity/pull/13773 Reviewed-by: https://github.com/linusg ✅
1 changed files with 7 additions and 2 deletions
|
@ -579,9 +579,14 @@ ThrowCompletionOr<Value> perform_eval(GlobalObject& global_object, Value x, Call
|
|||
return vm.throw_completion<SyntaxError>(global_object, error.to_string());
|
||||
}
|
||||
|
||||
auto strict_eval = strict_caller == CallerMode::Strict;
|
||||
if (program->is_strict_mode())
|
||||
bool strict_eval = false;
|
||||
|
||||
// 12. If strictCaller is true, let strictEval be true.
|
||||
if (strict_caller == CallerMode::Strict)
|
||||
strict_eval = true;
|
||||
// 13. Else, let strictEval be IsStrict of script.
|
||||
else
|
||||
strict_eval = program->is_strict_mode();
|
||||
|
||||
// 14. Let runningContext be the running execution context.
|
||||
// 15. NOTE: If direct is true, runningContext will be the execution context that performed the direct eval. If direct is false, runningContext will be the execution context for the invocation of the eval function.
|
||||
|
|
Loading…
Add table
Reference in a new issue