mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-29 05:38:24 +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
aabf3af3a0
commit
76146141fc
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