Properly handle primitive arguments in Object methods (#3342)

ES2015 allows primitive arguments for most of the Object built-ins.
This change implements handling for these arguments in affected methods.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-11-22 12:48:10 +01:00
committed by Robert Fancsik
parent d006f068f4
commit 3bf2bc50bc
10 changed files with 317 additions and 171 deletions
@@ -87,7 +87,7 @@ ecma_builtin_reflect_dispatch_routine (uint16_t builtin_routine_id, /**< built-i
{
case ECMA_REFLECT_OBJECT_GET_PROTOTYPE_OF_UL:
{
return ecma_builtin_object_object_get_prototype_of (arguments_list[0]);
return ecma_builtin_object_object_get_prototype_of (ecma_get_object_from_value (arguments_list[0]));
}
case ECMA_REFLECT_OBJECT_SET_PROTOTYPE_OF_UL:
{