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.
This commit is contained in:
Lenny Maiorani 2022-03-16 18:26:49 -06:00 committed by Linus Groh
commit a0367aa43b
Notes: sideshowbarker 2024-07-17 17:08:50 +09:00
17 changed files with 37 additions and 20 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <AK/StringView.h>
#include <LibJS/Runtime/NativeFunction.h>
namespace Web::Bindings {
@ -21,7 +22,7 @@ public:
private:
virtual bool has_constructor() const override { return true; }
virtual const char* class_name() const override { return "ImageConstructor"; }
virtual StringView class_name() const override { return "ImageConstructor"sv; }
};
}