本文整理汇总了C++中XPCContext::DebugDump方法的典型用法代码示例。如果您正苦于以下问题:C++ XPCContext::DebugDump方法的具体用法?C++ XPCContext::DebugDump怎么用?C++ XPCContext::DebugDump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XPCContext
的用法示例。
在下文中一共展示了XPCContext::DebugDump方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wrappers
void
XPCJSRuntime::DebugDump(PRInt16 depth)
{
#ifdef DEBUG
depth--;
XPC_LOG_ALWAYS(("XPCJSRuntime @ %x", this));
XPC_LOG_INDENT();
XPC_LOG_ALWAYS(("mXPConnect @ %x", mXPConnect));
XPC_LOG_ALWAYS(("mJSRuntime @ %x", mJSRuntime));
XPC_LOG_ALWAYS(("mMapLock @ %x", mMapLock));
XPC_LOG_ALWAYS(("mWrappedJSToReleaseArray @ %x with %d wrappers(s)", \
&mWrappedJSToReleaseArray,
mWrappedJSToReleaseArray.Length()));
int cxCount = 0;
JSContext* iter = nsnull;
while(JS_ContextIterator(mJSRuntime, &iter))
++cxCount;
XPC_LOG_ALWAYS(("%d JS context(s)", cxCount));
iter = nsnull;
while(JS_ContextIterator(mJSRuntime, &iter))
{
XPCContext *xpc = XPCContext::GetXPCContext(iter);
XPC_LOG_INDENT();
xpc->DebugDump(depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mWrappedJSClassMap @ %x with %d wrapperclasses(s)", \
mWrappedJSClassMap, mWrappedJSClassMap ? \
mWrappedJSClassMap->Count() : 0));
// iterate wrappersclasses...
if(depth && mWrappedJSClassMap && mWrappedJSClassMap->Count())
{
XPC_LOG_INDENT();
mWrappedJSClassMap->Enumerate(WrappedJSClassMapDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mWrappedJSMap @ %x with %d wrappers(s)", \
mWrappedJSMap, mWrappedJSMap ? \
mWrappedJSMap->Count() : 0));
// iterate wrappers...
if(depth && mWrappedJSMap && mWrappedJSMap->Count())
{
XPC_LOG_INDENT();
mWrappedJSMap->Enumerate(WrappedJSMapDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mIID2NativeInterfaceMap @ %x with %d interface(s)", \
mIID2NativeInterfaceMap, mIID2NativeInterfaceMap ? \
mIID2NativeInterfaceMap->Count() : 0));
XPC_LOG_ALWAYS(("mClassInfo2NativeSetMap @ %x with %d sets(s)", \
mClassInfo2NativeSetMap, mClassInfo2NativeSetMap ? \
mClassInfo2NativeSetMap->Count() : 0));
XPC_LOG_ALWAYS(("mThisTranslatorMap @ %x with %d translator(s)", \
mThisTranslatorMap, mThisTranslatorMap ? \
mThisTranslatorMap->Count() : 0));
XPC_LOG_ALWAYS(("mNativeSetMap @ %x with %d sets(s)", \
mNativeSetMap, mNativeSetMap ? \
mNativeSetMap->Count() : 0));
// iterate sets...
if(depth && mNativeSetMap && mNativeSetMap->Count())
{
XPC_LOG_INDENT();
mNativeSetMap->Enumerate(NativeSetDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_OUTDENT();
#endif
}