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
-8
View File
@@ -61,14 +61,6 @@ assert (props.indexOf("prop") !== -1);
assert (props.indexOf("method") !== -1);
assert (props.length === 2);
// Test non-object argument
try {
Object.keys("hello");
assert (false);
} catch (e) {
assert (e instanceof TypeError);
}
var o = {};
Object.defineProperty(o, 'a', {