1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibJS: Convert GeneratorObject to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-11-09 16:48:44 +02:00
parent 11a90700df
commit 91881be4b0
4 changed files with 16 additions and 25 deletions

View file

@ -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: