mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:17:35 +00:00
LibJS: Convert get_this_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
4f03138971
commit
0aa24f4ce5
8 changed files with 21 additions and 16 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace JS {
|
||||
|
@ -28,7 +29,7 @@ public:
|
|||
virtual void initialize(GlobalObject&) override;
|
||||
|
||||
virtual bool has_this_binding() const { return false; }
|
||||
virtual Value get_this_binding(GlobalObject&) const { return {}; }
|
||||
virtual ThrowCompletionOr<Value> get_this_binding(GlobalObject&) const { return Value {}; }
|
||||
|
||||
virtual Object* with_base_object() const { return nullptr; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue