diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-20 09:48:43 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:58:30 +0100 |
commit | 999da617c5a59f2c8bc8b199c69014ee04668ee1 (patch) | |
tree | 501d5e7ea375319fa8fb8f4385f6fecd6f76c338 /Userland/Services/WebContent/ConsoleGlobalObject.cpp | |
parent | f3117d46dc872a2d0f57273293b5691777b06279 (diff) | |
download | serenity-999da617c5a59f2c8bc8b199c69014ee04668ee1.zip |
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.
Diffstat (limited to 'Userland/Services/WebContent/ConsoleGlobalObject.cpp')
-rw-r--r-- | Userland/Services/WebContent/ConsoleGlobalObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/WebContent/ConsoleGlobalObject.cpp b/Userland/Services/WebContent/ConsoleGlobalObject.cpp index ec752943d7..77ec8704d0 100644 --- a/Userland/Services/WebContent/ConsoleGlobalObject.cpp +++ b/Userland/Services/WebContent/ConsoleGlobalObject.cpp @@ -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"); |