mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:18:11 +00:00
LibJS: Change all [[RelevantExtensionKeys]] to return constexpr arrays
There's no need to allocate a vector for this internal slot. Similar to
commit: bb11437792
This commit is contained in:
parent
e27b077c2a
commit
d2588d852b
9 changed files with 31 additions and 38 deletions
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Array.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibJS/Runtime/Array.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
|
@ -17,14 +16,6 @@
|
|||
|
||||
namespace JS::Intl {
|
||||
|
||||
Vector<StringView> const& NumberFormat::relevant_extension_keys()
|
||||
{
|
||||
// 15.3.3 Internal slots, https://tc39.es/ecma402/#sec-intl.numberformat-internal-slots
|
||||
// The value of the [[RelevantExtensionKeys]] internal slot is « "nu" ».
|
||||
static Vector<StringView> relevant_extension_keys { "nu"sv };
|
||||
return relevant_extension_keys;
|
||||
}
|
||||
|
||||
// 15 NumberFormat Objects, https://tc39.es/ecma402/#numberformat-objects
|
||||
NumberFormat::NumberFormat(Object& prototype)
|
||||
: Object(prototype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue