mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
LibJS: Convert GeneratorObject to ThrowCompletionOr
This commit is contained in:
parent
11a90700df
commit
91881be4b0
Notes:
sideshowbarker
2024-07-18 01:21:51 +09:00
Author: https://github.com/IdanHo
Commit: 91881be4b0
Pull-request: https://github.com/SerenityOS/serenity/pull/10852
Reviewed-by: https://github.com/linusg ✅
4 changed files with 16 additions and 25 deletions
|
@ -16,13 +16,13 @@ class GeneratorObject final : public Object {
|
|||
JS_OBJECT(GeneratorObject, Object);
|
||||
|
||||
public:
|
||||
static GeneratorObject* create(GlobalObject&, Value, ECMAScriptFunctionObject*, Environment*, Bytecode::RegisterWindow);
|
||||
static ThrowCompletionOr<GeneratorObject*> create(GlobalObject&, Value, ECMAScriptFunctionObject*, Environment*, Bytecode::RegisterWindow);
|
||||
GeneratorObject(GlobalObject&, Object& prototype);
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~GeneratorObject() override;
|
||||
void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
Value next_impl(VM&, GlobalObject&, Optional<Value> value_to_throw);
|
||||
ThrowCompletionOr<Value> next_impl(VM&, GlobalObject&, Optional<Value> value_to_throw);
|
||||
void set_done() { m_done = true; }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue