Fix double-addref leak of pres shell. (Leaking the pres shell without leaking the doc viewer causes us to leak the frame tree while deleting the view tree, which causes crashes after leaving pages with animated images. Fix for that problem coming soon.) b=80203 r=sspitzer sr=ben

This commit is contained in:
dbaron%fas.harvard.edu 2001-05-18 11:36:54 +00:00
Родитель c9aa3bdd83
Коммит e7c709c283
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -92,7 +92,7 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
if (doc) {
nsIPresShell* shell = doc->GetShellAt(0);
nsCOMPtr<nsIPresShell> shell(dont_AddRef(doc->GetShellAt(0)));
if (shell) {
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context) );

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

@ -92,7 +92,7 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
if (doc) {
nsIPresShell* shell = doc->GetShellAt(0);
nsCOMPtr<nsIPresShell> shell(dont_AddRef(doc->GetShellAt(0)));
if (shell) {
nsCOMPtr<nsIPresContext> context;
shell->GetPresContext(getter_AddRefs(context) );