Index: trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp	(revision 101926)
+++ trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp	(revision 101927)
@@ -1525,5 +1525,5 @@
     , mPeerID(aPeerID)
     , mCachedISupports(0)
-    , mRefCntLevels(0)
+    , mRefCntLevels()
     {}
 
Index: trunk/src/libs/xpcom18a4/xpcom/ds/nsDeque.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/ds/nsDeque.cpp	(revision 101926)
+++ trunk/src/libs/xpcom18a4/xpcom/ds/nsDeque.cpp	(revision 101927)
@@ -78,9 +78,7 @@
 /**
  * Standard constructor
- * @param deallocator, called by Erase and ~nsDeque
- */
-nsDeque::nsDeque(nsDequeFunctor* aDeallocator) {
+ */
+nsDeque::nsDeque() {
   MOZ_COUNT_CTOR(nsDeque);
-  mDeallocator=aDeallocator;
   mOrigin=mSize=0;
   mData=mBuffer; // don't allocate space until you must
@@ -95,26 +93,4 @@
   MOZ_COUNT_DTOR(nsDeque);
 
-#ifdef DEBUG_rickg
-  char buffer[30];
-  printf("Capacity: %i\n", mCapacity);
-
-  static int mCaps[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-  switch(mCapacity) {
-    case 4:     mCaps[0]++; break;
-    case 8:     mCaps[1]++; break;
-    case 16:    mCaps[2]++; break;
-    case 32:    mCaps[3]++; break;
-    case 64:    mCaps[4]++; break;
-    case 128:   mCaps[5]++; break;
-    case 256:   mCaps[6]++; break;
-    case 512:   mCaps[7]++; break;
-    case 1024:  mCaps[8]++; break;
-    case 2048:  mCaps[9]++; break;
-    case 4096:  mCaps[10]++; break;
-    default:
-      break;
-  }
-#endif
-
   Erase();
   if (mData && (mData!=mBuffer)) {
@@ -122,18 +98,4 @@
   }
   mData=0;
-  SetDeallocator(0);
-}
-
-/**
- * Set the functor to be called by Erase()
- * The deque owns the functor.
- *
- * @param   aDeallocator functor object for use by Erase()
- */
-void nsDeque::SetDeallocator(nsDequeFunctor* aDeallocator){
-  if (mDeallocator) {
-    delete mDeallocator;
-  }
-  mDeallocator=aDeallocator;
 }
 
@@ -158,7 +120,4 @@
  */
 nsDeque& nsDeque::Erase() {
-  if (mDeallocator && mSize) {
-    ForEach(*mDeallocator);
-  }
   return Empty();
 }
@@ -358,270 +317,2 @@
 }
 
-/**
- * Create and return an iterator pointing to
- * the beginning of the queue. Note that this
- * takes the circular buffer semantics into account.
- *
- * @return  new deque iterator, init'ed to 1st item
- */
-nsDequeIterator nsDeque::Begin() const{
-  return nsDequeIterator(*this, 0);
-}
-
-/**
- * Create and return an iterator pointing to
- * the last item in the deque.
- * Note that this takes the circular buffer semantics
- * into account.
- *
- * @return  new deque iterator, init'ed to the last item
- */
-nsDequeIterator nsDeque::End() const{
-  return nsDequeIterator(*this, mSize - 1);
-}
-
-void* nsDeque::Last() const {
-  return End().GetCurrent();
-}
-
-/**
- * Call this method when you want to iterate all the
- * members of the container, passing a functor along
- * to call your code.
- *
- * @param   aFunctor object to call for each member
- * @return  *this
- */
-void nsDeque::ForEach(nsDequeFunctor& aFunctor) const{
-  for (PRInt32 i=0; i<mSize; i++) {
-    aFunctor(ObjectAt(i));
-  }
-}
-
-/**
- * Call this method when you want to iterate all the
- * members of the container, calling the functor you 
- * passed with each member. This process will interrupt
- * if your function returns non 0 to this method.
- *
- * @param   aFunctor object to call for each member
- * @return  first nonzero result of aFunctor or 0.
- */
-const void* nsDeque::FirstThat(nsDequeFunctor& aFunctor) const{
-  for (PRInt32 i=0; i<mSize; i++) {
-    void* obj=aFunctor(ObjectAt(i));
-    if (obj) {
-      return obj;
-    }
-  }
-  return 0;
-}
-
-/******************************************************
- * Here comes the nsDequeIterator class...
- ******************************************************/
-
-/**
- * DequeIterator is an object that knows how to iterate (forward and backward)
- * through a Deque. Normally, you don't need to do this, but there are some special
- * cases where it is pretty handy, so here you go.
- *
- * This is a standard dequeiterator constructor
- *
- * @param   aQueue is the deque object to be iterated
- * @param   aIndex is the starting position for your iteration
- */
-nsDequeIterator::nsDequeIterator(const nsDeque& aQueue, int aIndex)
-: mIndex(aIndex),
-  mDeque(aQueue)
-{
-}
-
-/**
- * Create a copy of a DequeIterator
- *
- * @param   aCopy is another iterator to copy from
- */
-nsDequeIterator::nsDequeIterator(const nsDequeIterator& aCopy)
-: mIndex(aCopy.mIndex),
-  mDeque(aCopy.mDeque)
-{
-}
-
-/**
- * Moves iterator to first element in deque
- * @return  *this
- */
-nsDequeIterator& nsDequeIterator::First(){
-  mIndex=0;
-  return *this;
-}
-
-/**
- * Standard assignment operator for dequeiterator
- *
- * @param   aCopy is an iterator to be copied from
- * @return  *this
- */
-nsDequeIterator& nsDequeIterator::operator=(const nsDequeIterator& aCopy) {
-  NS_ASSERTION(&mDeque==&aCopy.mDeque,"you can't change the deque that an interator is iterating over, sorry.");
-  mIndex=aCopy.mIndex;
-  return *this;
-}
-
-/**
- * preform ! operation against to iterators to test for equivalence
- * (or lack thereof)!
- *
- * @param   aIter is the object to be compared to
- * @return  TRUE if NOT equal.
- */
-PRBool nsDequeIterator::operator!=(nsDequeIterator& aIter) {
-  return PRBool(!this->operator==(aIter));
-}
-
-/**
- * Compare two iterators for increasing order.
- *
- * @param   aIter is the other iterator to be compared to
- * @return  TRUE if this object points to an element before
- *          the element pointed to by aIter.
- *          FALSE if this and aIter are not iterating over the same deque.
- */
-PRBool nsDequeIterator::operator<(nsDequeIterator& aIter) {
-  return PRBool(((mIndex<aIter.mIndex) && (&mDeque==&aIter.mDeque)));
-}
-
-/**
- * Compare two iterators for equivalence.
- *
- * @param   aIter is the other iterator to be compared to
- * @return  TRUE if EQUAL
- */
-PRBool nsDequeIterator::operator==(nsDequeIterator& aIter) {
-  return PRBool(((mIndex==aIter.mIndex) && (&mDeque==&aIter.mDeque)));
-}
-
-/**
- * Compare two iterators for non strict decreasing order.
- *
- * @param   aIter is the other iterator to be compared to
- * @return  TRUE if this object points to the same element, or
- *          an element after the element pointed to by aIter.
- *          FALSE if this and aIter are not iterating over the same deque.
- */
-PRBool nsDequeIterator::operator>=(nsDequeIterator& aIter) {
-  return PRBool(((mIndex>=aIter.mIndex) && (&mDeque==&aIter.mDeque)));
-}
-
-/**
- * Pre-increment operator
- *
- * @return  object at post-incremented index
- */
-void* nsDequeIterator::operator++() {
-  NS_ASSERTION(mIndex<mDeque.mSize,
-    "You have reached the end of the Internet."\
-    "You have seen everything there is to see. Please go back. Now."
-  );
-#ifndef TIMELESS_LIGHTWEIGHT
-  if (mIndex>=mDeque.mSize) return 0;
-#endif
-  return mDeque.ObjectAt(++mIndex);
-}
-
-/**
- * Post-increment operator
- *
- * @param   param is ignored
- * @return  object at pre-incremented index
- */
-void* nsDequeIterator::operator++(int) {
-  NS_ASSERTION(mIndex<=mDeque.mSize,
-    "You have already reached the end of the Internet."\
-    "You have seen everything there is to see. Please go back. Now."
-  );
-#ifndef TIMELESS_LIGHTWEIGHT
-  if (mIndex>mDeque.mSize) return 0;
-#endif
-  return mDeque.ObjectAt(mIndex++);
-}
-
-/**
- * Pre-decrement operator
- *
- * @return  object at pre-decremented index
- */
-void* nsDequeIterator::operator--() {
-  NS_ASSERTION(mIndex>=0,
-    "You have reached the beginning of the Internet."\
-    "You have seen everything there is to see. Please go forward. Now."
-  );
-#ifndef TIMELESS_LIGHTWEIGHT
-  if (mIndex<0) return 0;
-#endif
-  return mDeque.ObjectAt(--mIndex);
-}
-
-/**
- * Post-decrement operator
- *
- * @param   param is ignored
- * @return  object at post-decremented index
- */
-void* nsDequeIterator::operator--(int) {
-  NS_ASSERTION(mIndex>=0,
-    "You have already reached the beginning of the Internet."\
-    "You have seen everything there is to see. Please go forward. Now."
-  );
-#ifndef TIMELESS_LIGHTWEIGHT
-  if (mIndex<0) return 0;
-#endif
-  return mDeque.ObjectAt(mIndex--);
-}
-
-/**
- * Dereference operator
- * Note that the iterator floats, so you don't need to do:
- * <code>++iter; aDeque.PopFront();</code>
- * Unless you actually want your iterator to jump 2 spaces.
- *
- * Picture: [1 2I 3 4]
- * PopFront()
- * Picture: [2 3I 4]
- * Note that I still happily points to object at the second index
- *
- * @return  object at ith index
- */
-void* nsDequeIterator::GetCurrent() {
-  NS_ASSERTION(mIndex<mDeque.mSize&&mIndex>=0,"Current is out of bounds");
-#ifndef TIMELESS_LIGHTWEIGHT
-  if (mIndex>=mDeque.mSize||mIndex<0) return 0;
-#endif
-  return mDeque.ObjectAt(mIndex);
-}
-
-/**
- * Call this method when you want to iterate all the
- * members of the container, passing a functor along
- * to call your code.
- *
- * @param   aFunctor object to call for each member
- * @return  *this
- */
-void nsDequeIterator::ForEach(nsDequeFunctor& aFunctor) const{
-  mDeque.ForEach(aFunctor);
-}
-
-/**
- * Call this method when you want to iterate all the
- * members of the container, calling the functor you 
- * passed with each member. This process will interrupt
- * if your function returns non 0 to this method.
- *
- * @param   aFunctor object to call for each member
- * @return  first nonzero result of aFunctor or 0.
- */
-const void* nsDequeIterator::FirstThat(nsDequeFunctor& aFunctor) const{
-  return mDeque.FirstThat(aFunctor);
-}
Index: trunk/src/libs/xpcom18a4/xpcom/ds/nsDeque.h
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/ds/nsDeque.h	(revision 101926)
+++ trunk/src/libs/xpcom18a4/xpcom/ds/nsDeque.h	(revision 101927)
@@ -59,16 +59,4 @@
 #include "nscore.h"
 
-/**
- * The nsDequeFunctor class is used when you want to create
- * callbacks between the deque and your generic code.
- * Use these objects in a call to ForEach();
- *
- */
-
-class nsDequeFunctor{
-public:
-  virtual void* operator()(void* anObject)=0;
-};
-
 /******************************************************
  * Here comes the nsDeque class itself...
@@ -84,11 +72,7 @@
  * The deque stores pointers to items.
  */
-
-class nsDequeIterator;
-
 class NS_COM nsDeque {
-  friend class nsDequeIterator;
   public:
-   nsDeque(nsDequeFunctor* aDeallocator);
+   nsDeque();
   ~nsDeque();
 
@@ -169,58 +153,12 @@
   nsDeque& Erase();
 
-  /**
-   * Creates a new iterator, pointing to the first
-   * item in the deque.
-   *
-   * @return  new dequeIterator
-   */
-  nsDequeIterator Begin() const;
-
-  /**
-   * Creates a new iterator, pointing to the last
-   * item in the deque.
-   *
-   * @return  new dequeIterator
-   */
-  nsDequeIterator End() const;
-
-  void* Last() const;
-  /**
-   * Call this method when you want to iterate all the
-   * members of the container, passing a functor along
-   * to call your code.
-   *
-   * @param   aFunctor object to call for each member
-   * @return  *this
-   */
-  void ForEach(nsDequeFunctor& aFunctor) const;
-
-  /**
-   * Call this method when you want to iterate all the
-   * members of the container, calling the functor you 
-   * passed with each member. This process will interrupt
-   * if your function returns non 0 to this method.
-   *
-   * @param   aFunctor object to call for each member
-   * @return  first nonzero result of aFunctor or 0.
-   */
-  const void* FirstThat(nsDequeFunctor& aFunctor) const;
-
-  void SetDeallocator(nsDequeFunctor* aDeallocator);
-
 protected:
   PRInt32         mSize;
   PRInt32         mCapacity;
   PRInt32         mOrigin;
-  nsDequeFunctor* mDeallocator;
   void*           mBuffer[8];
   void**          mData;
 
 private:
-
-  /**
-   * Simple default constructor (PRIVATE)
-   */
-  nsDeque();
 
   /**
@@ -242,164 +180,3 @@
 };
 
-/******************************************************
- * Here comes the nsDequeIterator class...
- ******************************************************/
-
-class nsDequeIterator {
-public:
-  /**
-   * DequeIterator is an object that knows how to iterate
-   * (forward and backward) through a Deque. Normally,
-   * you don't need to do this, but there are some special
-   * cases where it is pretty handy.
-   *
-   * One warning: the iterator is not bound to an item,
-   * it is bound to an index, so if you insert or remove
-   * from the beginning while using an iterator
-   * (which is not recommended) then the iterator will
-   * point to a different item.  @see GetCurrent()
-   *
-   * Here you go.
-   *
-   * @param   aQueue is the deque object to be iterated
-   * @param   aIndex is the starting position for your iteration
-   */
-  nsDequeIterator(const nsDeque& aQueue, int aIndex=0);
-
-  /**
-   * Create a copy of a DequeIterator
-   *
-   * @param   aCopy is another iterator to copy from
-   */
-  nsDequeIterator(const nsDequeIterator& aCopy);
-
-  /**
-   * Moves iterator to first element in the deque
-   * @return  *this
-   */
-  nsDequeIterator& First();
-
-  /**
-   * Standard assignment operator for dequeiterator
-   * @param   aCopy is another iterator to copy from
-   * @return  *this
-   */
-  nsDequeIterator& operator=(const nsDequeIterator& aCopy);
-
-  /**
-   * preform ! operation against two iterators to test for equivalence
-   * (or lack thereof)!
-   *
-   * @param   aIter is the object to be compared to
-   * @return  TRUE if NOT equal.
-   */
-  PRBool operator!=(nsDequeIterator& aIter);
-
-  /**
-   * Compare two iterators for increasing order.
-   *
-   * @param   aIter is the other iterator to be compared to
-   * @return  TRUE if this object points to an element before
-   *          the element pointed to by aIter.
-   *          FALSE if this and aIter are not iterating over
-   *          the same deque.
-   */
-  PRBool operator<(nsDequeIterator& aIter);
-
-  /**
-   * Compare two iterators for equivalence.
-   *
-   * @param   aIter is the other iterator to be compared to
-   * @return  TRUE if EQUAL
-   */
-  PRBool operator==(nsDequeIterator& aIter);
-
-  /**
-   * Compare two iterators for non strict decreasing order.
-   *
-   * @param   aIter is the other iterator to be compared to
-   * @return  TRUE if this object points to the same element, or
-   *          an element after the element pointed to by aIter.
-   *          FALSE if this and aIter are not iterating over
-   *          the same deque.
-   */
-  PRBool operator>=(nsDequeIterator& aIter);
-
-  /**
-   * Pre-increment operator
-   * Iterator will advance one index towards the end.
-   *
-   * @return  object_at(++index)
-   */
-  void* operator++();
-
-  /**
-   * Post-increment operator
-   * Iterator will advance one index towards the end.
-   *
-   * @param   param is ignored
-   * @return  object_at(mIndex++)
-   */
-  void* operator++(int);
-
-  /**
-   * Pre-decrement operator
-   * Iterator will advance one index towards the beginning.
-   *
-   * @return  object_at(--index)
-   */
-  void* operator--();
-
-  /**
-   * Post-decrement operator
-   * Iterator will advance one index towards the beginning.
-   *
-   * @param   param is ignored
-   * @return  object_at(index--)
-   */
-  void* operator--(int);
-
-  /**
-   * Retrieve the the iterator's notion of current node.
-   *
-   * Note that the iterator floats, so you don't need to do:
-   * <code>++iter; aDeque.PopFront();</code>
-   * Unless you actually want your iterator to jump 2 positions
-   * relative to its origin.
-   *
-   * Picture: [1 2i 3 4]
-   * PopFront()
-   * Picture: [2 3i 4]
-   * Note that I still happily points to object at the second index.
-   *
-   * @return  object at i'th index
-   */
-  void* GetCurrent();
-
-  /**
-   * Call this method when you want to iterate all the
-   * members of the container, passing a functor along
-   * to call your code.
-   *
-   * @param   aFunctor object to call for each member
-   * @return  *this
-   */
-  void ForEach(nsDequeFunctor& aFunctor) const;
-
-  /**
-   * Call this method when you want to iterate all the
-   * members of the container, calling the functor you 
-   * passed with each member. This process will interrupt
-   * if your function returns non 0 to this method.
-   *
-   * @param   aFunctor object to call for each member
-   * @return  first nonzero result of aFunctor or 0.
-   */
-  const void* FirstThat(nsDequeFunctor& aFunctor) const;
-
-  protected:
-
-  PRInt32         mIndex;
-  const nsDeque&  mDeque;
-};
 #endif
Index: trunk/src/libs/xpcom18a4/xpcom/tests/TestDeque.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/xpcom/tests/TestDeque.cpp	(revision 101926)
+++ trunk/src/libs/xpcom18a4/xpcom/tests/TestDeque.cpp	(revision 101927)
@@ -40,7 +40,4 @@
 #include <stdio.h>
 
-/**************************************************************
-  Now define the token deallocator class...
- **************************************************************/
 class _TestDeque {
 public:
@@ -54,10 +51,4 @@
 };
 static _TestDeque sTestDeque;
-
-class _Dealloc: public nsDequeFunctor {
-  virtual void* operator()(void* aObject) {
-    return 0;
-  }
-};
 
 /**
@@ -81,5 +72,5 @@
   int i=0;
   int* temp;
-  nsDeque theDeque(new _Dealloc); //construct a simple one...
+  nsDeque theDeque; //construct a simple one...
  
   for (i=0;i<count;i++) { //initialize'em
@@ -111,5 +102,5 @@
   int i=0;
   int* temp;
-  nsDeque secondDeque(new _Dealloc);
+  nsDeque secondDeque;
   /**
    * Test 1. Origin near end, semi full, call Peek().
@@ -146,5 +137,5 @@
 
 nsresult _TestDeque::AssignFlaw() {
-  nsDeque src(new _Dealloc),dest(new _Dealloc);
+  nsDeque src, dest;
   return NS_OK;
 }
