LibJS: Stop tracking whether execution context is strict mode or not

This was only used for basic testing, and forced us to plumb this flag
flag in a bunch of places.
This commit is contained in:
Andreas Kling 2025-10-28 21:16:35 +01:00 committed by Andreas Kling
parent fb05063dde
commit fdb85a330e
Notes: github-actions[bot] 2025-10-29 20:22:21 +00:00
19 changed files with 4 additions and 320 deletions

View file

@ -151,9 +151,6 @@ ThrowCompletionOr<Value> NativeFunction::internal_call(ExecutionContext& callee_
// calling async_block_start which goes through a NativeFunction here.
callee_context.private_environment = caller_context.private_environment;
// NOTE: This is a LibJS specific hack for NativeFunction to inherit the strictness of its caller.
callee_context.is_strict_mode = caller_context.is_strict_mode;
// </8.> --------------------------------------------------------------------------
// 9. Push calleeContext onto the execution context stack; calleeContext is now the running execution context.
@ -204,9 +201,6 @@ ThrowCompletionOr<GC::Ref<Object>> NativeFunction::internal_construct(ExecutionC
callee_context.lexical_environment = caller_context.lexical_environment;
callee_context.variable_environment = caller_context.variable_environment;
// NOTE: This is a LibJS specific hack for NativeFunction to inherit the strictness of its caller.
callee_context.is_strict_mode = caller_context.is_strict_mode;
// </8.> --------------------------------------------------------------------------
// 9. Push calleeContext onto the execution context stack; calleeContext is now the running execution context.