зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
79ce792d99
Коммит
b29a765f15
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче