Bug 367779. followup snprintf fixes. patch by Ryan Jones <sciguyryan@gmail.com>. r+sr=brendan

This commit is contained in:
sayrer%gmail.com 2007-02-19 00:19:43 +00:00
Родитель 08efb2bc3d
Коммит 1d307e554d
3 изменённых файлов: 12 добавлений и 12 удалений

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

@ -596,10 +596,10 @@ nsXPConnect::Traverse(void *p, nsCycleCollectionTraversalCallback &cb)
XPCWrappedNative* wn = XPCNativeWrapper::GetWrappedNative(cx, obj);
XPCNativeScriptableInfo* si = wn ? wn->GetScriptableInfo() : nsnull;
if(si)
snprintf(name, sizeof(name), "XPCNativeWrapper (%s)",
si->GetJSClass()->name);
JS_snprintf(name, sizeof(name), "XPCNativeWrapper (%s)",
si->GetJSClass()->name);
else
snprintf(name, sizeof(name), "XPCNativeWrapper");
JS_snprintf(name, sizeof(name), "XPCNativeWrapper");
}
else if(obj)
{
@ -611,14 +611,14 @@ nsXPConnect::Traverse(void *p, nsCycleCollectionTraversalCallback &cb)
si = p->GetScriptableInfo();
}
if(si)
snprintf(name, sizeof(name), "JS Object (%s - %s)", clazz->name,
si->GetJSClass()->name);
JS_snprintf(name, sizeof(name), "JS Object (%s - %s)", clazz->name,
si->GetJSClass()->name);
else
snprintf(name, sizeof(name), "JS Object (%s)", clazz->name);
JS_snprintf(name, sizeof(name), "JS Object (%s)", clazz->name);
}
else
{
snprintf(name, sizeof(name), "JS Object");
JS_snprintf(name, sizeof(name), "JS Object");
}
cb.DescribeNode(refcount, sizeof(JSObject), name);
#else

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

@ -83,8 +83,8 @@ NS_CYCLE_COLLECTION_CLASSNAME(nsXPCWrappedJS)::Traverse
nsrefcnt refcnt = tmp->mRefCnt.get();
#ifdef DEBUG
char name[72];
snprintf(name, sizeof(name), "nsXPCWrappedJS (%s)",
tmp->GetClass()->GetInterfaceName());
JS_snprintf(name, sizeof(name), "nsXPCWrappedJS (%s)",
tmp->GetClass()->GetInterfaceName());
cb.DescribeNode(refcnt, sizeof(nsXPCWrappedJS), name);
#else
cb.DescribeNode(refcnt, sizeof(nsXPCWrappedJS), "nsXPCWrappedJS");

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

@ -61,10 +61,10 @@ NS_CYCLE_COLLECTION_CLASSNAME(XPCWrappedNative)::Traverse(nsISupports *s,
char name[72];
XPCNativeScriptableInfo* si = tmp->GetScriptableInfo();
if(si)
snprintf(name, sizeof(name), "XPCWrappedNative (%s)",
si->GetJSClass()->name);
JS_snprintf(name, sizeof(name), "XPCWrappedNative (%s)",
si->GetJSClass()->name);
else
snprintf(name, sizeof(name), "XPCWrappedNative");
JS_snprintf(name, sizeof(name), "XPCWrappedNative");
cb.DescribeNode(tmp->mRefCnt.get(), sizeof(XPCWrappedNative), name);
#else