diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-06-30 18:13:51 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-06-30 18:41:32 +0100 |
commit | c254e4cf10264cefe805578b14f2e4deaf286f56 (patch) | |
tree | a92d5d7d3bb104f7a7840eff1e5ee6091e2ea977 /Userland/Libraries/LibJS/Runtime/Value.cpp | |
parent | 5606332ed72e60fa720cf17ad055cca8d2d36b05 (diff) | |
download | serenity-c254e4cf10264cefe805578b14f2e4deaf286f56.zip |
LibJS: Get the prototype of a new String from the constructor's realm
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Value.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp index 0c8742b2f0..4c8f97a5bb 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.cpp +++ b/Userland/Libraries/LibJS/Runtime/Value.cpp @@ -449,7 +449,7 @@ Object* Value::to_object(GlobalObject& global_object) const case Type::Double: return NumberObject::create(global_object, as_double()); case Type::String: - return StringObject::create(global_object, *m_value.as_string); + return StringObject::create(global_object, *m_value.as_string, *global_object.string_prototype()); case Type::Symbol: return SymbolObject::create(global_object, *m_value.as_symbol); case Type::BigInt: |