mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibJS: Assume is_strict_mode called with running execution context
This should always be invoked when there is an execution context on the stack.
This commit is contained in:
parent
f2fb86abea
commit
7d44640c0f
Notes:
github-actions[bot]
2025-05-23 01:26:54 +00:00
Author: https://github.com/shannonbooth
Commit: 7d44640c0f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4760
2 changed files with 4 additions and 8 deletions
|
@ -407,13 +407,6 @@ Object& VM::get_global_object()
|
|||
return current_realm.global_object();
|
||||
}
|
||||
|
||||
bool VM::in_strict_mode() const
|
||||
{
|
||||
if (execution_context_stack().is_empty())
|
||||
return false;
|
||||
return running_execution_context().is_strict_mode;
|
||||
}
|
||||
|
||||
void VM::run_queued_promise_jobs_impl()
|
||||
{
|
||||
dbgln_if(PROMISE_DEBUG, "Running queued promise jobs");
|
||||
|
|
|
@ -164,7 +164,10 @@ public:
|
|||
FunctionObject const* active_function_object() const { return running_execution_context().function; }
|
||||
FunctionObject* active_function_object() { return running_execution_context().function; }
|
||||
|
||||
bool in_strict_mode() const;
|
||||
bool in_strict_mode() const
|
||||
{
|
||||
return running_execution_context().is_strict_mode;
|
||||
}
|
||||
|
||||
size_t argument_count() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue