mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
LibJS: Convert push_execution_context() to ThrowCompletionOr
This commit is contained in:
parent
7cdca08090
commit
57de5056b6
10 changed files with 20 additions and 21 deletions
|
@ -98,14 +98,14 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
void push_execution_context(ExecutionContext& context, GlobalObject& global_object)
|
||||
ThrowCompletionOr<void> push_execution_context(ExecutionContext& context, GlobalObject& global_object)
|
||||
{
|
||||
VERIFY(!exception());
|
||||
// Ensure we got some stack space left, so the next function call doesn't kill us.
|
||||
if (did_reach_stack_space_limit())
|
||||
throw_exception<Error>(global_object, ErrorType::CallStackSizeExceeded);
|
||||
else
|
||||
m_execution_context_stack.append(&context);
|
||||
return throw_completion<Error>(global_object, ErrorType::CallStackSizeExceeded);
|
||||
m_execution_context_stack.append(&context);
|
||||
return {};
|
||||
}
|
||||
|
||||
void pop_execution_context()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue