mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02: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:
committed by
Andrew Kaster
parent
d1f9e3be90
commit
b58ba2e1bd
Notes:
github-actions[bot]
2025-01-30 20:58:24 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/b58ba2e1bd1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3231 Reviewed-by: https://github.com/ADKaster ✅
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user