зеркало из https://github.com/mozilla/pjs.git
Elaborate reference error message; fix iloop in __hasInstance__.
This commit is contained in:
Родитель
4a6709e5af
Коммит
1f4d1acecd
|
@ -201,6 +201,8 @@ function toObject(v, r, rn) {
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
var message = r + " (type " + (typeof v) + ") has no properties";
|
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)
|
throw rn ? new TypeError(message, rn.filename, rn.lineno)
|
||||||
: new TypeError(message);
|
: new TypeError(message);
|
||||||
}
|
}
|
||||||
|
@ -797,6 +799,7 @@ var FOp = FunctionObject.prototype = {
|
||||||
while ((o = v.__proto__)) {
|
while ((o = v.__proto__)) {
|
||||||
if (o == p)
|
if (o == p)
|
||||||
return true;
|
return true;
|
||||||
|
v = o;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче