This commit is contained in:
jst%mozilla.org 2007-12-18 01:57:19 +00:00
Родитель ccdfb18fea
Коммит 1ad055a48e
1 изменённых файлов: 12 добавлений и 10 удалений

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

@ -60,6 +60,18 @@ XPCCallContext::XPCCallContext(XPCContext::LangType callerLanguage,
mCallerLanguage(callerLanguage),
mCallee(nsnull)
{
// Mark our internal string wrappers as not used. Make sure we do
// this before any early returns, as the destructor will assert
// based on this.
StringWrapperEntry *se =
reinterpret_cast<StringWrapperEntry*>(&mStringWrapperData);
PRUint32 i;
for(i = 0; i < XPCCCX_STRING_CACHE_SIZE; ++i)
{
se[i].mInUse = PR_FALSE;
}
if(!mXPC)
return;
@ -163,16 +175,6 @@ XPCCallContext::XPCCallContext(XPCContext::LangType callerLanguage,
SetArgsAndResultPtr(argc, argv, rval);
CHECK_STATE(HAVE_OBJECT);
// Mark our internal string wrappers as not used.
StringWrapperEntry *se =
reinterpret_cast<StringWrapperEntry*>(&mStringWrapperData);
PRUint32 i;
for(i = 0; i < XPCCCX_STRING_CACHE_SIZE; ++i)
{
se[i].mInUse = PR_FALSE;
}
}
void