mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
LibJS: Remove GlobalObject from VM::this_value()
This is a continuation of the previous six commits. The global object is only needed to return it if the execution context stack is empty, but that doesn't seem like a useful thing to allow in the first place - if you're not currently executing JS, and the execution context stack is empty, there is no this value to retrieve.
This commit is contained in:
parent
f3117d46dc
commit
999da617c5
36 changed files with 208 additions and 206 deletions
|
@ -97,7 +97,7 @@ JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> ConsoleGlobalObject::internal
|
|||
|
||||
JS_DEFINE_NATIVE_FUNCTION(ConsoleGlobalObject::inspected_node_getter)
|
||||
{
|
||||
auto* this_object = TRY(vm.this_value(global_object).to_object(global_object));
|
||||
auto* this_object = TRY(vm.this_value().to_object(global_object));
|
||||
|
||||
if (!is<ConsoleGlobalObject>(this_object))
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "ConsoleGlobalObject");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue