Fix 15618 [CRASH] JS assertion on table regression test

Reviewed by rogerl@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@50020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
norris%netscape.com
1999-10-06 21:12:21 +00:00
parent 84fb96cb65
commit cd59845c25
2 changed files with 10 additions and 1 deletions

View File

@@ -46,7 +46,13 @@ nsCodebasePrincipal::Release(void)
NS_PRECONDITION(0 != mJSPrincipals.refcount, "dup release");
--mJSPrincipals.refcount;
NS_LOG_RELEASE(this, mJSPrincipals.refcount, "nsCodebasePrincipal");
if (mJSPrincipals.refcount == 0) {
if (mJSPrincipals.refcount == 0) {
#ifdef DEBUG_norris
char *spec;
mURI->GetSpec(&spec);
fprintf(stderr, "Releasing principal for %s\n", spec);
delete spec;
#endif
NS_DELETEXPCOM(this);
return 0;
}