multiple-comptrs
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 98 2f5dd5185b9d8eb4f3b3855f7789aae182fd06da
permissions -rw-r--r--
State as of now

Work around a garburator bug where you can't declare multiple comptrs on the same line.

diff --git a/extensions/cookie/nsCookiePermission.cpp b/extensions/cookie/nsCookiePermission.cpp
--- a/extensions/cookie/nsCookiePermission.cpp
+++ b/extensions/cookie/nsCookiePermission.cpp
@@ -464,8 +464,9 @@ nsCookiePermission::GetOriginatingURI(ns
     return NS_ERROR_NULL_POINTER;
 
   // find the docshell and its root
-  nsCOMPtr<nsIDocShellTreeItem> docshell, root;
-  NS_QueryNotificationCallbacks(aChannel, docshell);
+  nsIDocShellTreeItem *docshell = nsnull;
+  nsCOMPtr<nsIDocShellTreeItem> root;
+  NS_QueryNotificationCallbacks(aChannel, &docshell);
   if (docshell)
     docshell->GetSameTypeRootTreeItem(getter_AddRefs(root));