mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 01:37:16 +00:00
Bug 659852 - Remove nsContentUtils::ReleasePtrOnShutdown and nsContentUtils::sPtrsToPtrsToRelease. r=sicking
This commit is contained in:
parent
79635f2c9e
commit
113e350bd8
@ -870,16 +870,6 @@ public:
|
||||
*/
|
||||
static PRBool IsInChromeDocshell(nsIDocument *aDocument);
|
||||
|
||||
/**
|
||||
* Release *aSupportsPtr when the shutdown notification is received
|
||||
*/
|
||||
static nsresult ReleasePtrOnShutdown(nsISupports** aSupportsPtr) {
|
||||
NS_ASSERTION(aSupportsPtr, "Expect to crash!");
|
||||
NS_ASSERTION(*aSupportsPtr, "Expect to crash!");
|
||||
return sPtrsToPtrsToRelease->AppendElement(aSupportsPtr) != nsnull ? NS_OK :
|
||||
NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the content policy service
|
||||
*/
|
||||
@ -1833,9 +1823,6 @@ private:
|
||||
static nsIWordBreaker* sWordBreaker;
|
||||
static nsIUGenCategory* sGenCat;
|
||||
|
||||
// Holds pointers to nsISupports* that should be released at shutdown
|
||||
static nsTArray<nsISupports**>* sPtrsToPtrsToRelease;
|
||||
|
||||
static nsIScriptRuntime* sScriptRuntimes[NS_STID_ARRAY_UBOUND];
|
||||
static PRInt32 sScriptRootCount[NS_STID_ARRAY_UBOUND];
|
||||
static PRUint32 sJSGCThingRootCount;
|
||||
|
@ -247,7 +247,6 @@ PRBool nsContentUtils::sTriedToGetContentPolicy = PR_FALSE;
|
||||
nsILineBreaker *nsContentUtils::sLineBreaker;
|
||||
nsIWordBreaker *nsContentUtils::sWordBreaker;
|
||||
nsIUGenCategory *nsContentUtils::sGenCat;
|
||||
nsTArray<nsISupports**> *nsContentUtils::sPtrsToPtrsToRelease;
|
||||
nsIScriptRuntime *nsContentUtils::sScriptRuntimes[NS_STID_ARRAY_UBOUND];
|
||||
PRInt32 nsContentUtils::sScriptRootCount[NS_STID_ARRAY_UBOUND];
|
||||
PRUint32 nsContentUtils::sJSGCThingRootCount;
|
||||
@ -469,11 +468,6 @@ nsContentUtils::Init()
|
||||
rv = CallGetService(NS_UNICHARCATEGORY_CONTRACTID, &sGenCat);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
sPtrsToPtrsToRelease = new nsTArray<nsISupports**>();
|
||||
if (!sPtrsToPtrsToRelease) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (!InitializeEventTable())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@ -1207,15 +1201,6 @@ nsContentUtils::Shutdown()
|
||||
delete sUserDefinedEvents;
|
||||
sUserDefinedEvents = nsnull;
|
||||
|
||||
if (sPtrsToPtrsToRelease) {
|
||||
for (i = 0; i < sPtrsToPtrsToRelease->Length(); ++i) {
|
||||
nsISupports** ptrToPtr = sPtrsToPtrsToRelease->ElementAt(i);
|
||||
NS_RELEASE(*ptrToPtr);
|
||||
}
|
||||
delete sPtrsToPtrsToRelease;
|
||||
sPtrsToPtrsToRelease = nsnull;
|
||||
}
|
||||
|
||||
if (sEventListenerManagersHash.ops) {
|
||||
NS_ASSERTION(sEventListenerManagersHash.entryCount == 0,
|
||||
"Event listener manager hash not empty at shutdown!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user