зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
285a89a3cb
Коммит
12ea62d4af
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче