From c0ad926a1b4c0c511a952138f7c2fab3b3951b31 Mon Sep 17 00:00:00 2001 From: "brendan%mozilla.org" Date: Fri, 20 Feb 2004 07:35:28 +0000 Subject: [PATCH] Elaborate reference error message; fix iloop in __hasInstance__. --- js/narcissus/jsexec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/narcissus/jsexec.js b/js/narcissus/jsexec.js index 6faf92ed7b97..553a7dc62416 100644 --- a/js/narcissus/jsexec.js +++ b/js/narcissus/jsexec.js @@ -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; },