mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS: Remove weird fallback behavior in VM::argument/argument_count
If there's no running execution context, let's just error out in there instead of returning a weird empty value.
This commit is contained in:
parent
ceddc8d660
commit
0d91363742
Notes:
github-actions[bot]
2025-04-05 09:21:36 +00:00
Author: https://github.com/awesomekling
Commit: 0d91363742
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4232
1 changed files with 0 additions and 4 deletions
|
@ -165,15 +165,11 @@ public:
|
|||
|
||||
size_t argument_count() const
|
||||
{
|
||||
if (m_execution_context_stack.is_empty())
|
||||
return 0;
|
||||
return running_execution_context().arguments.size();
|
||||
}
|
||||
|
||||
Value argument(size_t index) const
|
||||
{
|
||||
if (m_execution_context_stack.is_empty())
|
||||
return {};
|
||||
return running_execution_context().argument(index);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue