bug 85355, XPCWrappedNative::ToString should sometimes yield '[object Foo]'. patch=dbradley, r=beard+me, sr=jst, a=dbaron.

Make .toString print [object <class>] instead of [object wrapped <classname>] for xpc wrapped objects with scriptable info.
This commit is contained in:
rginda%netscape.com 2001-06-20 00:04:36 +00:00
Родитель 285a89a3cb
Коммит 12ea62d4af
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -2243,9 +2243,12 @@ XPCWrappedNative::ToString(XPCCallContext& ccx,
{
return nsnull;
}
sz = JS_smprintf("[xpconnect wrapped %s" FMT_ADDR "]",
name PARAM_ADDR(this));
const char* fmt = "[xpconnect wrapped %s" FMT_ADDR "]";
if (si)
{
fmt = "[object %s" FMT_ADDR "]";
}
sz = JS_smprintf(fmt, name PARAM_ADDR(this));
JS_smprintf_free(name);