nsPresShellIterator
author benjamin@smedbergs.us
Fri, 25 Jan 2008 12:07:10 -0500
changeset 81 c44369c08f6589473ff14827f7c0001428eae19e
parent 70 94e945ee06a99c5ffbcfd08ce99176f1694328d3
permissions -rw-r--r--
Merged to actionmonkey stage 1! Yay.

diff --git a/content/base/public/nsPresShellIterator.h b/content/base/public/nsPresShellIterator.h
--- a/content/base/public/nsPresShellIterator.h
+++ b/content/base/public/nsPresShellIterator.h
@@ -47,22 +47,21 @@ public:
 public:
   nsPresShellIterator(nsIDocument* aDoc)
   : nsTObserverArray<nsIPresShell*>::ForwardIterator(aDoc->mPresShells),
-    mDoc(aDoc) {}
+    mDoc(aDoc)
+  {
+    ASSERT_StackObject(this);
+  }
 
-  already_AddRefed<nsIPresShell> GetNextShell()
+  nsIPresShell* GetNextShell()
   {
     nsIPresShell* shell = nsnull;
     if (!mDoc->ShellsAreHidden() && HasMore()) {
       shell = GetNext();
-      NS_IF_ADDREF(shell);
     }
     return shell;
   }
 private:
-  static void* operator new(size_t) CPP_THROW_NEW { return 0; }
-  static void operator delete(void*, size_t) {}
-
-  nsCOMPtr<nsIDocument> mDoc;
+  nsIDocument* mDoc;
 };
 
 #endif