зеркало из https://github.com/mozilla/pjs.git
Bug 300853 Caps crash on cleanup [@ DomainPolicy::Drop]
patch by g.maone@informaction.com r=caillon sr=dveditz a=bsmedberg
This commit is contained in:
Родитель
5c3c5c02bf
Коммит
741e9f0d95
|
@ -21,6 +21,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Christopher A. Aillon <christopher@aillon.com>
|
||||
* Giorgio Maone <g.maone@informaction.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* Norris Boyd <nboyd@atg.com>
|
||||
* Mitch Stoltz <mstoltz@netscape.com>
|
||||
* Christopher A. Aillon <christopher@aillon.com>
|
||||
* Giorgio Maone <g.maone@informaction.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -79,6 +80,7 @@ struct ClassPolicy;
|
|||
#define DEBUG_CAPS_CanCreateWrapper
|
||||
#define DEBUG_CAPS_CanCreateInstance
|
||||
#define DEBUG_CAPS_CanGetService
|
||||
#define DEBUG_CAPS_DomainPolicyLifeCycle
|
||||
#endif
|
||||
|
||||
/////////////////////
|
||||
|
@ -290,8 +292,9 @@ public:
|
|||
~DomainPolicy()
|
||||
{
|
||||
PL_DHashTableFinish(this);
|
||||
|
||||
NS_ASSERTION(mRefCount == 0, "Wrong refcount in DomainPolicy dtor");
|
||||
#ifdef DEBUG_CAPS_DomainPolicyLifeCycle
|
||||
printf("DomainPolicy deleted with mRefCount = %d\n", mRefCount);
|
||||
--sObjects;
|
||||
_printPopulationInfo();
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Christopher A. Aillon <christopher@aillon.com>
|
||||
* Giorgio Maone <g.maone@informaction.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* Mitch Stoltz
|
||||
* Steve Morse
|
||||
* Christopher A. Aillon
|
||||
* Giorgio Maone
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -2891,7 +2892,8 @@ jsval nsScriptSecurityManager::sEnabledID = JSVAL_VOID;
|
|||
nsScriptSecurityManager::~nsScriptSecurityManager(void)
|
||||
{
|
||||
delete mOriginToPolicyMap;
|
||||
delete mDefaultPolicy;
|
||||
if(mDefaultPolicy)
|
||||
mDefaultPolicy->Drop();
|
||||
delete mCapabilities;
|
||||
gScriptSecMan = nsnull;
|
||||
}
|
||||
|
@ -2980,8 +2982,10 @@ nsScriptSecurityManager::InitPolicies()
|
|||
DomainPolicy::InvalidateAll();
|
||||
|
||||
//-- Release old default policy
|
||||
if(mDefaultPolicy)
|
||||
if(mDefaultPolicy) {
|
||||
mDefaultPolicy->Drop();
|
||||
mDefaultPolicy = nsnull;
|
||||
}
|
||||
|
||||
//-- Initialize a new mOriginToPolicyMap
|
||||
mOriginToPolicyMap =
|
||||
|
|
Загрузка…
Ссылка в новой задаче