From 7a2221d08f22e9403a820099754c76fef1c5803d Mon Sep 17 00:00:00 2001 From: Neil Rashbrook Date: Wed, 1 May 2013 23:58:12 +0100 Subject: [PATCH] Bug 866223 Compose windows are no longer recycled r=Standard8 --- mailnews/compose/src/nsMsgComposeService.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mailnews/compose/src/nsMsgComposeService.cpp b/mailnews/compose/src/nsMsgComposeService.cpp index 9be01e8636..a7f33076b9 100644 --- a/mailnews/compose/src/nsMsgComposeService.cpp +++ b/mailnews/compose/src/nsMsgComposeService.cpp @@ -827,7 +827,11 @@ nsMsgComposeService::CacheWindow(nsIDOMWindow *aWindow, bool aComposeHTML, nsIMs nsCOMPtr treeItem(do_QueryInterface(window->GetDocShell(), &rv)); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr xulWindow(do_GetInterface(treeItem, &rv)); + nsCOMPtr treeOwner; + rv = treeItem->GetTreeOwner(getter_AddRefs(treeOwner)); + NS_ENSURE_SUCCESS(rv,rv); + + nsCOMPtr xulWindow(do_GetInterface(treeOwner, &rv)); NS_ENSURE_SUCCESS(rv, rv); int32_t i;