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:
Peter Gal 2015-08-05 11:30:45 +02:00
parent 5888401318
commit fe0ec9d7fa
3 changed files with 3 additions and 10 deletions

View File

@ -27,7 +27,7 @@ BUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
/* The Object object (15.2.1) */
BUILTIN (ECMA_BUILTIN_ID_OBJECT,
ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
true,
object)

View File

@ -118,15 +118,6 @@ assert (foo.prototype === undefined);
var func = Number.prototype.toString.bind('foo');
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 {
var math = Math.sin;
var bound = math.bind(null, 0);

View File

@ -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(Function_A, 0) === false);
assert (Function.prototype.isPrototypeOf (Object) === true)