Elaborate reference error message; fix iloop in __hasInstance__.

This commit is contained in:
brendan%mozilla.org 2004-02-20 07:35:28 +00:00
parent e91eb18b8d
commit c0ad926a1b

View File

@ -201,6 +201,8 @@ function toObject(v, r, rn) {
return v;
}
var message = r + " (type " + (typeof v) + ") has no properties";
if (r instanceof Reference)
message += ", not even " + r.propertyName;
throw rn ? new TypeError(message, rn.filename, rn.lineno)
: new TypeError(message);
}
@ -797,6 +799,7 @@ var FOp = FunctionObject.prototype = {
while ((o = v.__proto__)) {
if (o == p)
return true;
v = o;
}
return false;
},