mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
LibJS: Add support for constructing a PropertyKey from a FlyString
This commit is contained in:
parent
8fa0730b84
commit
713d8dc0f8
Notes:
sideshowbarker
2024-07-17 06:35:16 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/713d8dc0f8 Pull-request: https://github.com/SerenityOS/serenity/pull/23788
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/StringOrSymbol.h>
|
||||
|
@ -71,6 +72,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
PropertyKey(FlyString const& string)
|
||||
: m_type(Type::String)
|
||||
, m_string(string.to_deprecated_fly_string())
|
||||
{
|
||||
}
|
||||
|
||||
PropertyKey(DeprecatedFlyString string, StringMayBeNumber string_may_be_number = StringMayBeNumber::Yes)
|
||||
: m_string_may_be_number(string_may_be_number == StringMayBeNumber::Yes)
|
||||
, m_type(Type::String)
|
||||
|
|
Loading…
Reference in a new issue