mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibJS: Localize popping of execution context in AsyncFunctionDriver
Instead of adding a flag for the two callers that need a pop of the execution context stack when invoking continue_async_execution inline the pop of the execution context. This makes the management of these stacks and surrounding VERIFY calls much more obvious.
This commit is contained in:
parent
d1f9e3be90
commit
b58ba2e1bd
Notes:
github-actions[bot]
2025-01-30 20:58:24 +00:00
Author: https://github.com/shannonbooth
Commit: b58ba2e1bd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3231
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 6 additions and 15 deletions
|
@ -19,17 +19,12 @@ class AsyncFunctionDriverWrapper final : public Promise {
|
|||
GC_DECLARE_ALLOCATOR(AsyncFunctionDriverWrapper);
|
||||
|
||||
public:
|
||||
enum class IsInitialExecution {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
[[nodiscard]] static GC::Ref<Promise> create(Realm&, GeneratorObject*);
|
||||
|
||||
virtual ~AsyncFunctionDriverWrapper() override = default;
|
||||
void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void continue_async_execution(VM&, Value, bool is_successful, IsInitialExecution is_initial_execution = IsInitialExecution::No);
|
||||
void continue_async_execution(VM&, Value, bool is_successful);
|
||||
|
||||
private:
|
||||
AsyncFunctionDriverWrapper(Realm&, GC::Ref<GeneratorObject>, GC::Ref<Promise> top_level_promise);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue