LibJS: Skip object creation for BigInt and Symbol values in GetValue
I'm not sure why these were omitted initially - works fine for other engines, e.g.: -d5aed64eff/src/types/language/value.zig (L1279-L1292)
-5792a94c10/Source/JavaScriptCore/runtime/JSCJSValue.cpp (L180-L206)
This commit is contained in:
parent
5cf1570f40
commit
d667721b24
Notes:
sideshowbarker
2024-07-16 23:52:22 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/d667721b24 Pull-request: https://github.com/SerenityOS/serenity/pull/22966
1 changed files with 4 additions and 0 deletions
|
@ -122,6 +122,10 @@ ThrowCompletionOr<Value> Reference::get_value(VM& vm) const
|
|||
base_obj = realm.intrinsics().number_prototype();
|
||||
else if (m_base_value.is_boolean())
|
||||
base_obj = realm.intrinsics().boolean_prototype();
|
||||
else if (m_base_value.is_bigint())
|
||||
base_obj = realm.intrinsics().bigint_prototype();
|
||||
else if (m_base_value.is_symbol())
|
||||
base_obj = realm.intrinsics().symbol_prototype();
|
||||
else
|
||||
base_obj = TRY(m_base_value.to_object(vm));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue