зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c9aa3bdd83
Коммит
e7c709c283
|
@ -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) );
|
||||
|
|
Загрузка…
Ссылка в новой задаче