mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
LibJS: Replace standalone js_symbol() with Symbol::create()
This commit is contained in:
parent
525f22d018
commit
1dd8655514
4 changed files with 12 additions and 15 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
||||
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -16,6 +17,8 @@ class Symbol final : public Cell {
|
|||
JS_CELL(Symbol, Cell);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static NonnullGCPtr<Symbol> create(VM&, Optional<DeprecatedString> description, bool is_global);
|
||||
|
||||
virtual ~Symbol() = default;
|
||||
|
||||
DeprecatedString description() const { return m_description.value_or(""); }
|
||||
|
@ -30,7 +33,4 @@ private:
|
|||
bool m_is_global;
|
||||
};
|
||||
|
||||
Symbol* js_symbol(Heap&, Optional<DeprecatedString> description, bool is_global);
|
||||
Symbol* js_symbol(VM&, Optional<DeprecatedString> description, bool is_global);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue