diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-03-16 18:26:49 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-19 00:20:46 +0000 |
commit | a0367aa43b89b9714a86475407aef5702ae9e79d (patch) | |
tree | 5314c918b0698750b0ac1bab1948b370bbfdc363 /Userland/Libraries/LibJS/Runtime/PromiseReaction.h | |
parent | 5b7a5b3c01007b1ba332310ed1b669bd8b4edebc (diff) | |
download | serenity-a0367aa43b89b9714a86475407aef5702ae9e79d.zip |
DevTools+LibJS+LibWeb: Change class_name to use StringView
This helps make the overall codebase consistent. `class_name()` in
`Kernel` is always `StringView`, but not elsewhere.
Additionally, this results in the `strlen` (which needs to be done
when printing or other operations) always being computed at
compile-time.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PromiseReaction.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/PromiseReaction.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseReaction.h b/Userland/Libraries/LibJS/Runtime/PromiseReaction.h index 5640843513..71f1905fc6 100644 --- a/Userland/Libraries/LibJS/Runtime/PromiseReaction.h +++ b/Userland/Libraries/LibJS/Runtime/PromiseReaction.h @@ -6,6 +6,7 @@ #pragma once +#include <AK/StringView.h> #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/JobCallback.h> #include <LibJS/Runtime/VM.h> @@ -79,7 +80,7 @@ public: const Optional<JobCallback>& handler() const { return m_handler; } private: - virtual const char* class_name() const override { return "PromiseReaction"; } + virtual StringView class_name() const override { return "PromiseReaction"sv; } virtual void visit_edges(Visitor&) override; Type m_type; |