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:
committed by
Robert Fancsik
parent
d006f068f4
commit
3bf2bc50bc
@@ -20,23 +20,6 @@ assert (Object.isExtensible(empty) === true);
|
||||
Object.preventExtensions(empty);
|
||||
assert(Object.isExtensible(empty) === false);
|
||||
|
||||
// Call on undefined should throw TypeError.
|
||||
try
|
||||
{
|
||||
Object.isExtensible(undefined);
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Object.preventExtensions(undefined);
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
// Sealed objects are by definition non-extensible.
|
||||
var sealed = Object.seal({});
|
||||
assert (Object.isExtensible(sealed) === false);
|
||||
|
||||
Reference in New Issue
Block a user