зеркало из https://github.com/mozilla/pjs.git
Bug 367779. followup snprintf fixes. patch by Ryan Jones <sciguyryan@gmail.com>. r+sr=brendan
This commit is contained in:
Родитель
08efb2bc3d
Коммит
1d307e554d
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче