Ongoing fix for bug 81446. r=peter lubcynzski. sr=jst. a=asa. Fixes leaks of PARAM elements which now get destroyed when the document goes away. This fix ddoes away with 394206 bytes of leaks described in bugs 129423, 129424, 129425, 129429. We still leak memory across reloads of the same page so bug 81446 is being left open.

This commit is contained in:
nisheeth%netscape.com 2002-03-11 21:52:32 +00:00
Родитель f500f24a80
Коммит 5e2562e44e
2 изменённых файлов: 40 добавлений и 46 удалений

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

@ -2955,9 +2955,7 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
// now fill in the PARAM name/value pairs from the cached DOM nodes
c = 0;
for (PRInt16 idx = 0; idx < mNumCachedParams; idx++) {
nsCOMPtr<nsISupports> sup = ourParams->ElementAt(idx);
if (sup) {
nsCOMPtr<nsIDOMElement> param = do_QueryInterface(sup);
nsCOMPtr<nsIDOMElement> param = do_QueryElementAt(ourParams, idx);
if (param) {
nsAutoString name;
nsAutoString value;
@ -2979,7 +2977,6 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
c++; // rules!
}
}
}
return NS_OK;
}

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

@ -2955,9 +2955,7 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
// now fill in the PARAM name/value pairs from the cached DOM nodes
c = 0;
for (PRInt16 idx = 0; idx < mNumCachedParams; idx++) {
nsCOMPtr<nsISupports> sup = ourParams->ElementAt(idx);
if (sup) {
nsCOMPtr<nsIDOMElement> param = do_QueryInterface(sup);
nsCOMPtr<nsIDOMElement> param = do_QueryElementAt(ourParams, idx);
if (param) {
nsAutoString name;
nsAutoString value;
@ -2979,7 +2977,6 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
c++; // rules!
}
}
}
return NS_OK;
}