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

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