Bug 947044 - Provide a suggestion when throwing ReferenceError: <name> is not defined. r=luke

This commit is contained in:
Nick Fitzgerald
2014-09-23 16:34:00 +02:00
parent 2ae9a0ccb1
commit d24bfaec71
16 changed files with 271 additions and 32 deletions

View File

@@ -5076,9 +5076,8 @@ GetPropertyHelperInline(JSContext *cx,
if (op == JSOP_GETXPROP) {
/* Undefined property during a name lookup, report an error. */
JSAutoByteString printable;
if (js_ValueToPrintable(cx, IdToValue(id), &printable))
js_ReportIsNotDefined(cx, printable.ptr());
RootedAtom atom(cx, JSID_TO_ATOM(id));
js_ReportIsNotDefined(cx, atom);
return false;
}