diff --git a/mozilla/content/html/style/src/nsCSSRule.cpp b/mozilla/content/html/style/src/nsCSSRule.cpp
index 55537414998..9b242d0c520 100644
--- a/mozilla/content/html/style/src/nsCSSRule.cpp
+++ b/mozilla/content/html/style/src/nsCSSRule.cpp
@@ -37,7 +37,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsCSSRule.h"
#include "nsCRT.h"
-#include "nsIArena.h"
#include "nsICSSStyleSheet.h"
nsCSSRule::nsCSSRule(void)
diff --git a/mozilla/content/html/style/src/nsCSSRule.h b/mozilla/content/html/style/src/nsCSSRule.h
index 5499c2ffeca..65c9a173727 100644
--- a/mozilla/content/html/style/src/nsCSSRule.h
+++ b/mozilla/content/html/style/src/nsCSSRule.h
@@ -40,7 +40,6 @@
#include "nsISupports.h"
-class nsIArena;
class nsIStyleSheet;
class nsICSSStyleSheet;
class nsIPresContext;
diff --git a/mozilla/content/html/style/src/nsCSSStyleRule.cpp b/mozilla/content/html/style/src/nsCSSStyleRule.cpp
index bd84ad82f19..88c3e99cca0 100644
--- a/mozilla/content/html/style/src/nsCSSStyleRule.cpp
+++ b/mozilla/content/html/style/src/nsCSSStyleRule.cpp
@@ -50,7 +50,6 @@
#include "nsIPresContext.h"
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
-#include "nsIArena.h"
#include "nsIAtom.h"
#include "nsCRT.h"
#include "nsString.h"
diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp
index 738074a728a..57c81719ad6 100644
--- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp
+++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp
@@ -46,7 +46,6 @@
#include "plarena.h"
#include "nsICSSStyleSheet.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/content/html/style/src/nsHTMLAttributes.cpp b/mozilla/content/html/style/src/nsHTMLAttributes.cpp
index eeb54dc5e0a..ca104f55b4d 100644
--- a/mozilla/content/html/style/src/nsHTMLAttributes.cpp
+++ b/mozilla/content/html/style/src/nsHTMLAttributes.cpp
@@ -47,7 +47,6 @@
#include "nsString.h"
#include "nsISupportsArray.h"
#include "nsCRT.h"
-#include "nsIArena.h"
#include "nsHTMLAtoms.h"
#include "nsIHTMLContent.h"
#include "nsVoidArray.h"
diff --git a/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp
index 8d23f69b83b..44f4559a596 100644
--- a/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp
+++ b/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp
@@ -38,7 +38,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsIHTMLCSSStyleSheet.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp
index acca1d48a03..004e1b06258 100644
--- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp
+++ b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp
@@ -29,7 +29,6 @@
*/
#include "nsINameSpaceManager.h"
#include "nsIHTMLStyleSheet.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/content/html/style/src/nsICSSStyleRule.h b/mozilla/content/html/style/src/nsICSSStyleRule.h
index 94afae748e4..943a60fe860 100644
--- a/mozilla/content/html/style/src/nsICSSStyleRule.h
+++ b/mozilla/content/html/style/src/nsICSSStyleRule.h
@@ -48,7 +48,6 @@
#include "nsIAtom.h"
class nsIAtom;
-class nsIArena;
class nsCSSDeclaration;
class nsICSSStyleSheet;
diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp
index 0e385ca0051..bd5513a96ae 100644
--- a/mozilla/layout/base/nsCSSFrameConstructor.cpp
+++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp
@@ -38,7 +38,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsCSSFrameConstructor.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/layout/base/nsIPresShell.h b/mozilla/layout/base/nsIPresShell.h
index 0958b20b1da..2d70114a1ee 100644
--- a/mozilla/layout/base/nsIPresShell.h
+++ b/mozilla/layout/base/nsIPresShell.h
@@ -63,7 +63,6 @@ class nsStyleContext;
class nsIFrameSelection;
class nsIFrameManager;
class nsILayoutHistoryState;
-class nsIArena;
class nsIReflowCallback;
class nsISupportsArray;
class nsIDOMNode;
diff --git a/mozilla/layout/base/public/nsIPresShell.h b/mozilla/layout/base/public/nsIPresShell.h
index 0958b20b1da..2d70114a1ee 100644
--- a/mozilla/layout/base/public/nsIPresShell.h
+++ b/mozilla/layout/base/public/nsIPresShell.h
@@ -63,7 +63,6 @@ class nsStyleContext;
class nsIFrameSelection;
class nsIFrameManager;
class nsILayoutHistoryState;
-class nsIArena;
class nsIReflowCallback;
class nsISupportsArray;
class nsIDOMNode;
diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp
index b332684a6d6..42424c83f6d 100644
--- a/mozilla/layout/generic/nsFrame.cpp
+++ b/mozilla/layout/generic/nsFrame.cpp
@@ -42,7 +42,6 @@
#include "nsLineLayout.h"
#include "nsIContent.h"
#include "nsIAtom.h"
-#include "nsIArena.h"
#include "nsString.h"
#include "nsStyleContext.h"
#include "nsIView.h"
@@ -647,7 +646,7 @@ nsFrame::Destroy(nsIPresContext* aPresContext)
}
// Deleting the frame doesn't really free the memory, since we're using an
- // nsIArena for allocation, but we will get our destructors called.
+ // arena for allocation, but we will get our destructors called.
delete this;
// Now that we're totally cleaned out, we need to add ourselves to the presshell's
diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h
index da81431c94d..e8d3948fad6 100644
--- a/mozilla/layout/generic/nsFrame.h
+++ b/mozilla/layout/generic/nsFrame.h
@@ -140,7 +140,7 @@ public:
void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW;
// Overridden to prevent the global delete from being called, since the memory
- // came out of an nsIArena instead of the global delete operator's heap.
+ // came out of an arena instead of the global delete operator's heap.
// XXX Would like to make this private some day, but our UNIX compilers can't
// deal with it.
void operator delete(void* aPtr, size_t sz);
diff --git a/mozilla/layout/generic/nsHTMLParts.h b/mozilla/layout/generic/nsHTMLParts.h
index 8d896572a14..341273a1db7 100644
--- a/mozilla/layout/generic/nsHTMLParts.h
+++ b/mozilla/layout/generic/nsHTMLParts.h
@@ -41,7 +41,6 @@
#include "nsISupports.h"
#include "nsReflowType.h"
class nsHTMLReflowCommand;
-class nsIArena;
class nsIAtom;
class nsINodeInfo;
class nsIContent;
diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp
index b332684a6d6..42424c83f6d 100644
--- a/mozilla/layout/html/base/src/nsFrame.cpp
+++ b/mozilla/layout/html/base/src/nsFrame.cpp
@@ -42,7 +42,6 @@
#include "nsLineLayout.h"
#include "nsIContent.h"
#include "nsIAtom.h"
-#include "nsIArena.h"
#include "nsString.h"
#include "nsStyleContext.h"
#include "nsIView.h"
@@ -647,7 +646,7 @@ nsFrame::Destroy(nsIPresContext* aPresContext)
}
// Deleting the frame doesn't really free the memory, since we're using an
- // nsIArena for allocation, but we will get our destructors called.
+ // arena for allocation, but we will get our destructors called.
delete this;
// Now that we're totally cleaned out, we need to add ourselves to the presshell's
diff --git a/mozilla/layout/html/base/src/nsFrame.h b/mozilla/layout/html/base/src/nsFrame.h
index da81431c94d..e8d3948fad6 100644
--- a/mozilla/layout/html/base/src/nsFrame.h
+++ b/mozilla/layout/html/base/src/nsFrame.h
@@ -140,7 +140,7 @@ public:
void* operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW;
// Overridden to prevent the global delete from being called, since the memory
- // came out of an nsIArena instead of the global delete operator's heap.
+ // came out of an arena instead of the global delete operator's heap.
// XXX Would like to make this private some day, but our UNIX compilers can't
// deal with it.
void operator delete(void* aPtr, size_t sz);
diff --git a/mozilla/layout/html/base/src/nsHTMLParts.h b/mozilla/layout/html/base/src/nsHTMLParts.h
index 8d896572a14..341273a1db7 100644
--- a/mozilla/layout/html/base/src/nsHTMLParts.h
+++ b/mozilla/layout/html/base/src/nsHTMLParts.h
@@ -41,7 +41,6 @@
#include "nsISupports.h"
#include "nsReflowType.h"
class nsHTMLReflowCommand;
-class nsIArena;
class nsIAtom;
class nsINodeInfo;
class nsIContent;
diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp
index 0e385ca0051..bd5513a96ae 100644
--- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp
+++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp
@@ -38,7 +38,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsCSSFrameConstructor.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/layout/style/nsCSSRule.cpp b/mozilla/layout/style/nsCSSRule.cpp
index 55537414998..9b242d0c520 100644
--- a/mozilla/layout/style/nsCSSRule.cpp
+++ b/mozilla/layout/style/nsCSSRule.cpp
@@ -37,7 +37,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsCSSRule.h"
#include "nsCRT.h"
-#include "nsIArena.h"
#include "nsICSSStyleSheet.h"
nsCSSRule::nsCSSRule(void)
diff --git a/mozilla/layout/style/nsCSSRule.h b/mozilla/layout/style/nsCSSRule.h
index 5499c2ffeca..65c9a173727 100644
--- a/mozilla/layout/style/nsCSSRule.h
+++ b/mozilla/layout/style/nsCSSRule.h
@@ -40,7 +40,6 @@
#include "nsISupports.h"
-class nsIArena;
class nsIStyleSheet;
class nsICSSStyleSheet;
class nsIPresContext;
diff --git a/mozilla/layout/style/nsCSSStyleRule.cpp b/mozilla/layout/style/nsCSSStyleRule.cpp
index bd84ad82f19..88c3e99cca0 100644
--- a/mozilla/layout/style/nsCSSStyleRule.cpp
+++ b/mozilla/layout/style/nsCSSStyleRule.cpp
@@ -50,7 +50,6 @@
#include "nsIPresContext.h"
#include "nsIDocument.h"
#include "nsIDeviceContext.h"
-#include "nsIArena.h"
#include "nsIAtom.h"
#include "nsCRT.h"
#include "nsString.h"
diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp
index 738074a728a..57c81719ad6 100644
--- a/mozilla/layout/style/nsCSSStyleSheet.cpp
+++ b/mozilla/layout/style/nsCSSStyleSheet.cpp
@@ -46,7 +46,6 @@
#include "plarena.h"
#include "nsICSSStyleSheet.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp b/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp
index 8d23f69b83b..44f4559a596 100644
--- a/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp
+++ b/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp
@@ -38,7 +38,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsIHTMLCSSStyleSheet.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp
index acca1d48a03..004e1b06258 100644
--- a/mozilla/layout/style/nsHTMLStyleSheet.cpp
+++ b/mozilla/layout/style/nsHTMLStyleSheet.cpp
@@ -29,7 +29,6 @@
*/
#include "nsINameSpaceManager.h"
#include "nsIHTMLStyleSheet.h"
-#include "nsIArena.h"
#include "nsCRT.h"
#include "nsIAtom.h"
#include "nsIURL.h"
diff --git a/mozilla/layout/style/nsICSSStyleRule.h b/mozilla/layout/style/nsICSSStyleRule.h
index 94afae748e4..943a60fe860 100644
--- a/mozilla/layout/style/nsICSSStyleRule.h
+++ b/mozilla/layout/style/nsICSSStyleRule.h
@@ -48,7 +48,6 @@
#include "nsIAtom.h"
class nsIAtom;
-class nsIArena;
class nsCSSDeclaration;
class nsICSSStyleSheet;
diff --git a/mozilla/xpcom/build/dlldeps.cpp b/mozilla/xpcom/build/dlldeps.cpp
index f8f0c90c7d0..829d008f8a2 100644
--- a/mozilla/xpcom/build/dlldeps.cpp
+++ b/mozilla/xpcom/build/dlldeps.cpp
@@ -63,7 +63,6 @@
#include "xptcall.h"
#include "nsILocalFile.h"
#include "nsIGenericFactory.h"
-#include "nsHashtableEnumerator.h"
#include "nsIPipe.h"
#include "nsStreamUtils.h"
#include "nsCWeakReference.h"
@@ -137,7 +136,6 @@ void XXXNeverCalled()
XPTI_GetInterfaceInfoManager();
NS_NewGenericFactory(nsnull, nsnull);
NS_NewGenericModule2(nsnull, nsnull);
- NS_NewHashtableEnumerator(nsnull, nsnull, nsnull, nsnull);
nsCWeakProxy(0, 0);
nsCWeakReferent(0);
NS_GetWeakReference(nsnull);
diff --git a/mozilla/xpcom/build/nsXPComInit.cpp b/mozilla/xpcom/build/nsXPComInit.cpp
index 425612b9301..27fa1a684e6 100644
--- a/mozilla/xpcom/build/nsXPComInit.cpp
+++ b/mozilla/xpcom/build/nsXPComInit.cpp
@@ -51,7 +51,6 @@
#include "nsMemoryImpl.h"
#include "nsErrorService.h"
-#include "nsArena.h"
#include "nsByteBuffer.h"
#include "nsSupportsArray.h"
@@ -284,7 +283,6 @@ static const nsModuleComponentInfo components[] = {
#define NS_ERRORSERVICE_CLASSNAME NS_ERRORSERVICE_NAME
COMPONENT(ERRORSERVICE, nsErrorService::Create),
- COMPONENT(ARENA, ArenaImpl::Create),
COMPONENT(BYTEBUFFER, ByteBufferImpl::Create),
COMPONENT(SCRIPTABLEINPUTSTREAM, nsScriptableInputStream::Create),
COMPONENT(BINARYINPUTSTREAM, nsBinaryInputStreamConstructor),
diff --git a/mozilla/xpcom/components/nsNativeComponentLoader.cpp b/mozilla/xpcom/components/nsNativeComponentLoader.cpp
index 44721698f99..121c3dad10d 100644
--- a/mozilla/xpcom/components/nsNativeComponentLoader.cpp
+++ b/mozilla/xpcom/components/nsNativeComponentLoader.cpp
@@ -38,7 +38,6 @@
#include "nsIModule.h"
#include "xcDll.h"
#include "nsHashtable.h"
-#include "nsHashtableEnumerator.h"
#include "nsXPIDLString.h"
#include "nsCRT.h"
#include "nsIObserverService.h"
diff --git a/mozilla/xpcom/ds/Makefile.in b/mozilla/xpcom/ds/Makefile.in
index 8a7d1d3f47c..d266446890f 100644
--- a/mozilla/xpcom/ds/Makefile.in
+++ b/mozilla/xpcom/ds/Makefile.in
@@ -41,7 +41,6 @@ CSRCS = \
$(NULL)
CPPSRCS = \
- nsArena.cpp \
nsAtomTable.cpp \
nsAtomService.cpp \
nsByteBuffer.cpp \
@@ -53,7 +52,6 @@ CPPSRCS = \
nsFixedSizeAllocator.cpp \
nsHashSets.cpp \
nsHashtable.cpp \
- nsHashtableEnumerator.cpp \
nsObserver.cpp \
nsObserverList.cpp \
nsObserverService.cpp \
@@ -95,8 +93,6 @@ EXPORTS = \
nsHashSets.h \
nsHashKeys.h \
nsHashtable.h \
- nsHashtableEnumerator.h \
- nsIArena.h \
nsIByteBuffer.h \
nsIUnicharBuffer.h \
nsInt64.h \
diff --git a/mozilla/xpcom/ds/nsArena.cpp b/mozilla/xpcom/ds/nsArena.cpp
deleted file mode 100644
index 4717804c4e5..00000000000
--- a/mozilla/xpcom/ds/nsArena.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Pierre Phaneuf
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsArena.h"
-#include "nsCRT.h"
-
-ArenaImpl::ArenaImpl(void)
- : mInitialized(PR_FALSE)
-{
- memset(&mPool, 0, sizeof(PLArenaPool));
-}
-
-NS_IMETHODIMP
-ArenaImpl::Init(PRUint32 aBlockSize)
-{
- if (aBlockSize < NS_MIN_ARENA_BLOCK_SIZE) {
- aBlockSize = NS_DEFAULT_ARENA_BLOCK_SIZE;
- }
- PL_INIT_ARENA_POOL(&mPool, "nsIArena", aBlockSize);
- mBlockSize = aBlockSize;
- mInitialized = PR_TRUE;
- return NS_OK;
-}
-
-NS_IMPL_ISUPPORTS1(ArenaImpl, nsIArena)
-
-ArenaImpl::~ArenaImpl()
-{
- if (mInitialized)
- PL_FinishArenaPool(&mPool);
-
- mInitialized = PR_FALSE;
-}
-
-NS_IMETHODIMP_(void*)
-ArenaImpl::Alloc(PRUint32 size)
-{
- // Adjust size so that it's a multiple of sizeof(double)
- PRUint32 align = size & (sizeof(double) - 1);
- if (0 != align) {
- size += sizeof(double) - align;
- }
-
- void* p;
- PL_ARENA_ALLOCATE(p, &mPool, size);
- return p;
-}
-
-NS_METHOD
-ArenaImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
-{
- if (aOuter)
- return NS_ERROR_NO_AGGREGATION;
-
- ArenaImpl* it = new ArenaImpl();
- if (nsnull == it)
- return NS_ERROR_OUT_OF_MEMORY;
-
- NS_ADDREF(it);
- nsresult rv = it->QueryInterface(aIID, aResult);
- NS_RELEASE(it);
- return rv;
-}
-
-NS_COM nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult,
- PRUint32 aArenaBlockSize)
-{
- nsresult rv;
- nsIArena* arena;
- rv = ArenaImpl::Create(NULL, NS_GET_IID(nsIArena), (void**)&arena);
- if (NS_FAILED(rv)) return rv;
-
- rv = arena->Init(aArenaBlockSize);
- if (NS_FAILED(rv)) {
- NS_RELEASE(arena);
- return rv;
- }
-
- *aInstancePtrResult = arena;
- return rv;
-}
diff --git a/mozilla/xpcom/ds/nsArena.h b/mozilla/xpcom/ds/nsArena.h
deleted file mode 100644
index a6c0fa28bec..00000000000
--- a/mozilla/xpcom/ds/nsArena.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nsArena_h__
-#define nsArena_h__
-
-#include "nsIArena.h"
-
-#define PL_ARENA_CONST_ALIGN_MASK 7
-#include "plarena.h"
-
-// Simple arena implementation layered on plarena
-class ArenaImpl : public nsIArena {
-public:
- ArenaImpl(void);
- virtual ~ArenaImpl();
-
- NS_DECL_ISUPPORTS
-
- static NS_METHOD
- Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
-
- NS_IMETHOD Init(PRUint32 arenaBlockSize);
-
- NS_IMETHOD_(void*) Alloc(PRUint32 size);
-
-protected:
- PLArenaPool mPool;
- PRUint32 mBlockSize;
-
-private:
- PRBool mInitialized;
-};
-
-#endif // nsArena_h__
diff --git a/mozilla/xpcom/ds/nsHashtableEnumerator.cpp b/mozilla/xpcom/ds/nsHashtableEnumerator.cpp
deleted file mode 100644
index d7d7758483a..00000000000
--- a/mozilla/xpcom/ds/nsHashtableEnumerator.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Rob Ginda
- * Alec Flett
- * Pierre Phaneuf
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * Implementation of nsHashEnumerator.
- * Use it to expose nsISimpleEnumerator interfaces around nsHashtable objects.
- */
-
-#include "nscore.h"
-#include "nsHashtableEnumerator.h"
-#include "nsISimpleEnumerator.h"
-
-struct nsHashEnumClosure
-{
- nsHashEnumeratorConverterFunc Converter;
- nsISupports **Elements;
- PRUint32 Current;
- void *Data;
-};
-
-PRBool PR_CALLBACK
-hash_enumerator(nsHashKey *aKey, void *aObject, void *closure)
-{
- nsresult rv;
-
- nsHashEnumClosure *c = (nsHashEnumClosure *)closure;
-
- rv = c->Converter(aKey, (void *)aObject, (void *)c->Data,
- &c->Elements[c->Current]);
-
- if (NS_SUCCEEDED(rv))
- c->Current++;
-
- return PR_TRUE;
-
-}
-
-class nsHashtableEnumerator : public nsISimpleEnumerator
-{
-public:
- nsHashtableEnumerator(nsHashtable *aHash,
- nsHashEnumeratorConverterFunc aConverter,
- void* aData);
- virtual ~nsHashtableEnumerator();
-
- NS_DECL_ISUPPORTS
- NS_DECL_NSISIMPLEENUMERATOR
-
- void* operator new (size_t size, nsHashtable* aArray) CPP_THROW_NEW;
- void operator delete(void* ptr) {
- ::operator delete(ptr);
- }
-
-private:
- // not to be implemented
- void* operator new (size_t size);
-
- PRUint32 mCurrent;
- PRUint32 mCount;
- nsISupports* mElements[1];
-};
-
-NS_COM nsresult
-NS_NewHashtableEnumerator(nsHashtable *aHash,
- nsHashEnumeratorConverterFunc aConverter,
- void* aData, nsISimpleEnumerator **retval)
-{
- *retval = nsnull;
-
- nsHashtableEnumerator *hte =
- new (aHash) nsHashtableEnumerator(aHash, aConverter, aData);
-
- if (!hte)
- return NS_ERROR_OUT_OF_MEMORY;
-
- *retval = NS_STATIC_CAST(nsISimpleEnumerator*, hte);
- NS_ADDREF(*retval);
-
- return NS_OK;
-}
-
-void*
-nsHashtableEnumerator::operator new(size_t size, nsHashtable* aHash)
- CPP_THROW_NEW
-{
- // create enough space such that mValueArray points to a large
- // enough value. Note that the initial value of size gives us
- // space for mValueArray[0], so we must subtract
- size += (aHash->Count() - 1) * sizeof(nsISupports*);
-
- // do the actual allocation
- nsHashtableEnumerator * result =
- NS_STATIC_CAST(nsHashtableEnumerator*, ::operator new(size));
-
- return result;
-}
-
-NS_IMPL_ISUPPORTS1(nsHashtableEnumerator, nsISimpleEnumerator)
-
-nsHashtableEnumerator::nsHashtableEnumerator(nsHashtable *aHash,
- nsHashEnumeratorConverterFunc
- aConverter,
- void* aData)
-{
- nsHashEnumClosure c;
- c.Current = mCurrent = 0;
- c.Elements = mElements;
- c.Data = aData;
- c.Converter = aConverter;
- aHash->Enumerate(&hash_enumerator, &c);
-
- mCount = c.Current; /* some items may not have converted correctly */
-
-}
-
-nsHashtableEnumerator::~nsHashtableEnumerator()
-{
- for (;mCurrent= mCount) return NS_ERROR_UNEXPECTED;
-
- *aResult = mElements[mCurrent++];
- // no need to addref - we'll just steal the refcount from the
- // array of elements.. this is safe because the enumerator can
- // only advance through the list once.
- return NS_OK;
-}
diff --git a/mozilla/xpcom/ds/nsHashtableEnumerator.h b/mozilla/xpcom/ds/nsHashtableEnumerator.h
deleted file mode 100644
index 590ba3a10ca..00000000000
--- a/mozilla/xpcom/ds/nsHashtableEnumerator.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * This class can be used to expose nsI(BiDirectional)Enumerator interfaces
- * around nsHashtable objects.
- * Contributed by Rob Ginda, rginda@ix.netcom.com
- */
-
-#ifndef nsHashtableEnumerator_h___
-#define nsHashtableEnumerator_h___
-
-#include "nscore.h"
-#include "nsHashtable.h"
-
-class nsISimpleEnumerator;
-
-typedef NS_CALLBACK(nsHashEnumeratorConverterFunc) (nsHashKey *key, void *data,
- void *convert_data,
- nsISupports **retval);
-
-NS_COM nsresult
-NS_NewHashtableEnumerator(nsHashtable *aHash,
- nsHashEnumeratorConverterFunc aConverter,
- void *aData, nsISimpleEnumerator **retval);
-
-#endif /* nsHashtableEnumerator_h___ */
-
diff --git a/mozilla/xpcom/ds/nsIArena.h b/mozilla/xpcom/ds/nsIArena.h
deleted file mode 100644
index beb7138ab0b..00000000000
--- a/mozilla/xpcom/ds/nsIArena.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-#ifndef nsIArena_h___
-#define nsIArena_h___
-
-#include "nscore.h"
-#include "nsISupports.h"
-
-#define NS_MIN_ARENA_BLOCK_SIZE 64
-#define NS_DEFAULT_ARENA_BLOCK_SIZE 4096
-
-/// Interface IID for nsIArena
-#define NS_IARENA_IID \
-{ 0xa24fdad0, 0x93b4, 0x11d1, \
- {0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
-#define NS_ARENA_CONTRACTID "@mozilla.org/arena;1"
-#define NS_ARENA_CLASSNAME "Arena"
-
-/** Interface to a memory arena abstraction. Arena's use large blocks
- * of memory to allocate smaller objects. Arena's provide no free
- * operator; instead, all of the objects in the arena are deallocated
- * by deallocating the arena (e.g. when it's reference count goes to
- * zero)
- */
-class nsIArena : public nsISupports {
-public:
- NS_DEFINE_STATIC_IID_ACCESSOR(NS_IARENA_IID)
-
- NS_IMETHOD Init(PRUint32 arenaBlockSize) = 0;
-
- NS_IMETHOD_(void*) Alloc(PRUint32 size) = 0;
-};
-
-/**
- * Create a new arena using the desired block size for allocating the
- * underlying memory blocks. The underlying memory blocks are allocated
- * using the PR heap.
- */
-extern NS_COM nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult,
- PRUint32 aArenaBlockSize = 0);
-
-#define NS_ARENA_CID \
-{ /* 9832ec80-0d6b-11d3-9331-00104ba0fd40 */ \
- 0x9832ec80, \
- 0x0d6b, \
- 0x11d3, \
- {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
-}
-
-#endif /* nsIArena_h___ */
-
-
diff --git a/mozilla/xpcom/ds/nsObserver.cpp b/mozilla/xpcom/ds/nsObserver.cpp
index f1ff97df66b..5c764ceb2af 100644
--- a/mozilla/xpcom/ds/nsObserver.cpp
+++ b/mozilla/xpcom/ds/nsObserver.cpp
@@ -51,11 +51,6 @@ static NS_DEFINE_CID(kObserverCID, NS_OBSERVER_CID);
NS_IMPL_AGGREGATED(nsObserver)
-NS_COM nsresult NS_NewObserver(nsIObserver** anObserver, nsISupports* outer)
-{
- return nsObserver::Create(outer, NS_GET_IID(nsIObserver), (void**)anObserver);
-}
-
NS_METHOD
nsObserver::Create(nsISupports* outer, const nsIID& aIID, void* *anObserver)
{
diff --git a/mozilla/xpcom/ds/nsObserver.h b/mozilla/xpcom/ds/nsObserver.h
index 28227dd6f40..48dc9c44452 100644
--- a/mozilla/xpcom/ds/nsObserver.h
+++ b/mozilla/xpcom/ds/nsObserver.h
@@ -68,6 +68,4 @@ private:
};
-extern NS_COM nsresult NS_NewObserver(nsIObserver** anObserver, nsISupports* outer = NULL);
-
#endif /* nsObserver_h___ */
diff --git a/mozilla/xpcom/ds/nsSupportsPrimitives.cpp b/mozilla/xpcom/ds/nsSupportsPrimitives.cpp
index 7efae2be673..0cef986a6ad 100644
--- a/mozilla/xpcom/ds/nsSupportsPrimitives.cpp
+++ b/mozilla/xpcom/ds/nsSupportsPrimitives.cpp
@@ -224,21 +224,6 @@ NS_IMETHODIMP nsSupportsPRBoolImpl::ToString(char **_retval)
return result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
-NS_COM nsresult
-NS_NewISupportsPRBool (nsISupportsPRBool ** aResult)
-{
- NS_ENSURE_ARG_POINTER (aResult);
- nsISupportsPRBool * rval = (nsISupportsPRBool *) (new nsSupportsPRBoolImpl ());
-
- if (!rval)
- return NS_ERROR_OUT_OF_MEMORY;
-
- NS_ADDREF (rval);
- *aResult = rval;
-
- return NS_OK;
-}
-
/***************************************************************************/
NS_IMPL_ISUPPORTS2(nsSupportsPRUint8Impl, nsISupportsPRUint8,
diff --git a/mozilla/xpcom/io/nsIBinaryInputStream.idl b/mozilla/xpcom/io/nsIBinaryInputStream.idl
index 0a3c5519f2f..abf6dc81c0b 100644
--- a/mozilla/xpcom/io/nsIBinaryInputStream.idl
+++ b/mozilla/xpcom/io/nsIBinaryInputStream.idl
@@ -73,9 +73,6 @@ interface nsIBinaryInputStream : nsIInputStream {
%{C++
-NS_COM nsresult
-NS_NewBinaryInputStream(nsIBinaryInputStream* *aResult, nsIInputStream* aSrcStream);
-
inline nsresult
NS_ReadOptionalCString(nsIBinaryInputStream* aStream, nsACString& aResult)
{
diff --git a/mozilla/xpcom/io/nsIBinaryOutputStream.idl b/mozilla/xpcom/io/nsIBinaryOutputStream.idl
index e4bd3caf209..2c93b716036 100644
--- a/mozilla/xpcom/io/nsIBinaryOutputStream.idl
+++ b/mozilla/xpcom/io/nsIBinaryOutputStream.idl
@@ -79,9 +79,6 @@ interface nsIBinaryOutputStream : nsIOutputStream {
%{C++
-NS_COM nsresult
-NS_NewBinaryOutputStream(nsIBinaryOutputStream* *aResult, nsIOutputStream* aDestStream);
-
inline nsresult
NS_WriteOptionalStringZ(nsIBinaryOutputStream* aStream, const char* aString)
{