diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index d4f9e2bd29cc..ef1148930fe9 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -50,6 +50,7 @@ #include "GeckoProfiler.h" #include "gfx2DGlue.h" #include "gfxPrefs.h" +#include "nsProperties.h" #include namespace mozilla { @@ -1056,10 +1057,7 @@ NS_IMETHODIMP RasterImage::Set(const char* prop, nsISupports* value) { if (!mProperties) { - mProperties = do_CreateInstance("@mozilla.org/properties;1"); - } - if (!mProperties) { - return NS_ERROR_OUT_OF_MEMORY; + mProperties = new nsProperties(); } return mProperties->Set(prop, value); } diff --git a/image/imgRequest.cpp b/image/imgRequest.cpp index cded0e43e707..51ee8ec23ae3 100644 --- a/image/imgRequest.cpp +++ b/image/imgRequest.cpp @@ -37,6 +37,7 @@ #include "nsNetUtil.h" #include "nsIProtocolHandler.h" #include "imgIRequest.h" +#include "nsProperties.h" #include "mozilla/IntegerPrintfMacros.h" #include "mozilla/Telemetry.h" @@ -108,7 +109,7 @@ imgRequest::Init(nsIURI *aURI, MOZ_ASSERT(aRequest, "No request"); MOZ_ASSERT(aChannel, "No channel"); - mProperties = do_CreateInstance("@mozilla.org/properties;1"); + mProperties = new nsProperties(); mURI = aURI; mFinalURI = aFinalURI; mRequest = aRequest; diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp index 4e12a2b09b42..034f68de13e7 100644 --- a/xpcom/build/XPCOMInit.cpp +++ b/xpcom/build/XPCOMInit.cpp @@ -28,7 +28,6 @@ #include "nsCycleCollector.h" #include "nsObserverList.h" #include "nsObserverService.h" -#include "nsProperties.h" #include "nsPersistentProperties.h" #include "nsScriptableInputStream.h" #include "nsBinaryStream.h" @@ -211,8 +210,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsVariantCC) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHashPropertyBagCC) -NS_GENERIC_AGGREGATED_CONSTRUCTOR(nsProperties) - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUUIDGenerator, Init) #ifdef MOZ_WIDGET_COCOA diff --git a/xpcom/build/XPCOMModule.inc b/xpcom/build/XPCOMModule.inc index c335a236878b..478e3238386b 100644 --- a/xpcom/build/XPCOMModule.inc +++ b/xpcom/build/XPCOMModule.inc @@ -12,8 +12,6 @@ COMPONENT(SCRIPTABLEBASE64ENCODER, nsScriptableBase64EncoderConstructor) COMPONENT(PIPE, nsPipeConstructor) - COMPONENT(PROPERTIES, nsPropertiesConstructor) - COMPONENT(PERSISTENTPROPERTIES, nsPersistentProperties::Create) COMPONENT(ARRAY, nsArrayBase::XPCOMConstructor) diff --git a/xpcom/ds/moz.build b/xpcom/ds/moz.build index 63bff7d706f5..eb4e8777910a 100644 --- a/xpcom/ds/moz.build +++ b/xpcom/ds/moz.build @@ -62,6 +62,7 @@ EXPORTS += [ 'nsJSThingHashtable.h', 'nsMathUtils.h', 'nsPointerHashKeys.h', + 'nsProperties.h', 'nsQuickSort.h', 'nsRefPtrHashtable.h', 'nsSimpleEnumerator.h', diff --git a/xpcom/ds/nsProperties.h b/xpcom/ds/nsProperties.h index 6949017ddd4a..a1dd6a611203 100644 --- a/xpcom/ds/nsProperties.h +++ b/xpcom/ds/nsProperties.h @@ -13,14 +13,6 @@ #include "nsAgg.h" #include "mozilla/Attributes.h" -#define NS_PROPERTIES_CID \ -{ /* 4de2bc90-b1bf-11d3-93b6-00104ba0fd40 */ \ - 0x4de2bc90, \ - 0xb1bf, \ - 0x11d3, \ - {0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ -} - typedef nsInterfaceHashtable nsProperties_HashBase; @@ -32,7 +24,7 @@ public: NS_DECL_AGGREGATED NS_DECL_NSIPROPERTIES - explicit nsProperties(nsISupports *aOuter) { NS_INIT_AGGREGATED(aOuter); } + nsProperties() { NS_INIT_AGGREGATED(nullptr); } ~nsProperties() {} };