mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Object constructor prototype should be set to Function.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
parent
5888401318
commit
fe0ec9d7fa
@ -27,7 +27,7 @@ BUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
|||||||
/* The Object object (15.2.1) */
|
/* The Object object (15.2.1) */
|
||||||
BUILTIN (ECMA_BUILTIN_ID_OBJECT,
|
BUILTIN (ECMA_BUILTIN_ID_OBJECT,
|
||||||
ECMA_OBJECT_TYPE_FUNCTION,
|
ECMA_OBJECT_TYPE_FUNCTION,
|
||||||
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
object)
|
object)
|
||||||
|
|||||||
@ -118,15 +118,6 @@ assert (foo.prototype === undefined);
|
|||||||
var func = Number.prototype.toString.bind('foo');
|
var func = Number.prototype.toString.bind('foo');
|
||||||
assert (func instanceof Function);
|
assert (func instanceof Function);
|
||||||
|
|
||||||
try {
|
|
||||||
var this_obj = this.constructor;
|
|
||||||
var bound = this_obj.bind(null, "foo");
|
|
||||||
var foo = new bound();
|
|
||||||
assert (false);
|
|
||||||
} catch (e) {
|
|
||||||
assert (e instanceof TypeError);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var math = Math.sin;
|
var math = Math.sin;
|
||||||
var bound = math.bind(null, 0);
|
var bound = math.bind(null, 0);
|
||||||
|
|||||||
@ -31,3 +31,5 @@ assert (Function_A.prototype.isPrototypeOf (Array) === false)
|
|||||||
|
|
||||||
assert (Function_A.prototype.isPrototypeOf.call(0, 0) === false);
|
assert (Function_A.prototype.isPrototypeOf.call(0, 0) === false);
|
||||||
assert (Function_A.prototype.isPrototypeOf.call(Function_A, 0) === false);
|
assert (Function_A.prototype.isPrototypeOf.call(Function_A, 0) === false);
|
||||||
|
|
||||||
|
assert (Function.prototype.isPrototypeOf (Object) === true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user