LibJS: Avoid unnecessary FlyString(String) churn in Reference ctors

This commit is contained in:
Andreas Kling 2021-03-21 17:37:57 +01:00
parent 1fb50d823d
commit 46e61d208b
Notes: sideshowbarker 2024-07-18 21:11:10 +09:00

View file

@ -43,7 +43,7 @@ public:
}
enum LocalVariableTag { LocalVariable };
Reference(LocalVariableTag, const String& name, bool strict = false)
Reference(LocalVariableTag, const FlyString& name, bool strict = false)
: m_base(js_null())
, m_name(name)
, m_strict(strict)
@ -52,7 +52,7 @@ public:
}
enum GlobalVariableTag { GlobalVariable };
Reference(GlobalVariableTag, const String& name, bool strict = false)
Reference(GlobalVariableTag, const FlyString& name, bool strict = false)
: m_base(js_null())
, m_name(name)
, m_strict(strict)