mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 15:35:08 +00:00
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:
parent
5b7a5b3c01
commit
a0367aa43b
17 changed files with 37 additions and 20 deletions
|
@ -9,6 +9,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "DebuggerGlobalJSObject.h"
|
||||
#include <AK/StringView.h>
|
||||
#include <LibDebug/DebugInfo.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
@ -24,7 +25,7 @@ public:
|
|||
DebuggerVariableJSObject(const Debug::DebugInfo::VariableInfo& variable_info, JS::Object& prototype);
|
||||
virtual ~DebuggerVariableJSObject() override = default;
|
||||
|
||||
virtual const char* class_name() const override { return m_variable_info.type_name.characters(); }
|
||||
virtual StringView class_name() const override { return m_variable_info.type_name; }
|
||||
|
||||
JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue