Bug #14815 --> fix some ref counting problems between nsJSPrincipal and nsCodebasePrincipal. nsCodeBasePrinciapl

was always getting leaked. And since it held onto the document's nsIURI, our uri's were getting leaked to.
r=brendan,a=chofmann.
This commit is contained in:
mscott%netscape.com 1999-09-24 06:18:55 +00:00
Родитель 79ce792d99
Коммит b29a765f15
2 изменённых файлов: 0 добавлений и 3 удалений

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

@ -176,7 +176,6 @@ nsCodebasePrincipal::Init(nsIURI *uri)
return NS_ERROR_FAILURE;
}
// JSPrincipals::Init adopts codebase, so no need to free now
NS_ADDREF(this);
mURI = uri;
NS_ADDREF(mURI);
return NS_OK;

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

@ -61,8 +61,6 @@ nsJSPrincipals::~nsJSPrincipals()
{
if (codebase)
PL_strfree(codebase);
if (nsIPrincipalPtr)
NS_RELEASE(nsIPrincipalPtr);
}