diff --git a/js/src/xpconnect/src/nsXPConnect.cpp b/js/src/xpconnect/src/nsXPConnect.cpp index 70c518d67c7..a48072ee3c9 100644 --- a/js/src/xpconnect/src/nsXPConnect.cpp +++ b/js/src/xpconnect/src/nsXPConnect.cpp @@ -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 diff --git a/js/src/xpconnect/src/xpcwrappedjs.cpp b/js/src/xpconnect/src/xpcwrappedjs.cpp index b98d506a6a1..fee0b5faf77 100644 --- a/js/src/xpconnect/src/xpcwrappedjs.cpp +++ b/js/src/xpconnect/src/xpcwrappedjs.cpp @@ -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"); diff --git a/js/src/xpconnect/src/xpcwrappednative.cpp b/js/src/xpconnect/src/xpcwrappednative.cpp index c7668575660..bc48097c1fa 100644 --- a/js/src/xpconnect/src/xpcwrappednative.cpp +++ b/js/src/xpconnect/src/xpcwrappednative.cpp @@ -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