Backed out 3 changesets (bug 1491574) for build bustage at builds/worker/workspace/build/src/netwerk/base/nsNetUtil.cpp on a CLOSED TREE
authorCoroiu Cristina <ccoroiu@mozilla.com>
Tue, 18 Sep 2018 07:10:20 +0300
changeset 436899 3f0c26701ba0428481a9a0e5062cb921b7e5546d
parent 436898 5390b485f7e4a5d0a9c138b0df0cf1ed5f0b40a8
child 436900 fa882fd7194ecb9796ec1981fe0224d998facaf8
push id34664
push useraciure@mozilla.com
push dateTue, 18 Sep 2018 07:43:05 +0000
treeherdermozilla-central@85b4d2bf888a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1491574
milestone64.0a1
backs out5390b485f7e4a5d0a9c138b0df0cf1ed5f0b40a8
3d11b69de8264726f3005d7c75d1aec4f0c1e2ea
e7e8f3f70f8bf09dd48f13d583882460a290f98e
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1491574) for build bustage at builds/worker/workspace/build/src/netwerk/base/nsNetUtil.cpp on a CLOSED TREE Backed out changeset 5390b485f7e4 (bug 1491574) Backed out changeset 3d11b69de826 (bug 1491574) Backed out changeset e7e8f3f70f8b (bug 1491574)
accessible/generic/Accessible.cpp
accessible/generic/HyperTextAccessible.cpp
accessible/windows/msaa/ApplicationAccessibleWrap.cpp
accessible/xpcom/xpcAccessible.cpp
accessible/xul/XULTreeGridAccessible.cpp
image/RasterImage.cpp
image/imgRequest.cpp
js/xpconnect/idl/xpccomponents.idl
js/xpconnect/src/XPCComponents.cpp
netwerk/base/nsNetUtil.cpp
xpcom/build/XPCOMInit.cpp
xpcom/build/XPCOMModule.inc
xpcom/ds/moz.build
xpcom/ds/nsIPersistentProperties2.idl
xpcom/ds/nsPersistentProperties.cpp
xpcom/ds/nsPersistentProperties.h
xpcom/ds/nsProperties.h
xpcom/tests/unit/test_bug121341.js
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -60,17 +60,16 @@
 #include "nsAtom.h"
 #include "nsIURI.h"
 #include "nsArrayUtils.h"
 #include "nsIMutableArray.h"
 #include "nsIObserverService.h"
 #include "nsIServiceManager.h"
 #include "nsWhitespaceTokenizer.h"
 #include "nsAttrName.h"
-#include "nsPersistentProperties.h"
 
 #include "mozilla/Assertions.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/MouseEvents.h"
@@ -1015,17 +1014,18 @@ Accessible::Attributes()
   }
 
   return attributes.forget();
 }
 
 already_AddRefed<nsIPersistentProperties>
 Accessible::NativeAttributes()
 {
-  RefPtr<nsPersistentProperties> attributes = new nsPersistentProperties();
+  nsCOMPtr<nsIPersistentProperties> attributes =
+    do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
 
   nsAutoString unused;
 
   // We support values, so expose the string value as well, via the valuetext
   // object attribute. We test for the value interface because we don't want
   // to expose traditional Value() information such as URL's on links and
   // documents, or text in an input.
   if (HasNumericValue()) {
--- a/accessible/generic/HyperTextAccessible.cpp
+++ b/accessible/generic/HyperTextAccessible.cpp
@@ -20,17 +20,17 @@
 #include "nsCaret.h"
 #include "nsContentUtils.h"
 #include "nsFocusManager.h"
 #include "nsIEditingSession.h"
 #include "nsContainerFrame.h"
 #include "nsFrameSelection.h"
 #include "nsILineIterator.h"
 #include "nsIInterfaceRequestorUtils.h"
-#include "nsPersistentProperties.h"
+#include "nsIPersistentProperties2.h"
 #include "nsIScrollableFrame.h"
 #include "nsIServiceManager.h"
 #include "nsITextControlElement.h"
 #include "nsIMathMLFrame.h"
 #include "nsRange.h"
 #include "nsTextFragment.h"
 #include "mozilla/BinarySearch.h"
 #include "mozilla/dom/Element.h"
@@ -875,17 +875,18 @@ HyperTextAccessible::TextAttributes(bool
 
   *aStartOffset = *aEndOffset = 0;
   index_t offset = ConvertMagicOffset(aOffset);
   if (!offset.IsValid() || offset > CharacterCount()) {
     NS_ERROR("Wrong in offset!");
     return nullptr;
   }
 
-  RefPtr<nsPersistentProperties> attributes = new nsPersistentProperties();
+  nsCOMPtr<nsIPersistentProperties> attributes =
+    do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
 
   Accessible* accAtOffset = GetChildAtOffset(offset);
   if (!accAtOffset) {
     // Offset 0 is correct offset when accessible has empty text. Include
     // default attributes if they were requested, otherwise return empty set.
     if (offset == 0) {
       if (aIncludeDefAttrs) {
         TextAttrsMgr textAttrsMgr(this);
@@ -919,17 +920,18 @@ HyperTextAccessible::TextAttributes(bool
   *aStartOffset = startOffset;
   *aEndOffset = endOffset;
   return attributes.forget();
 }
 
 already_AddRefed<nsIPersistentProperties>
 HyperTextAccessible::DefaultTextAttributes()
 {
-  RefPtr<nsPersistentProperties> attributes = new nsPersistentProperties();
+  nsCOMPtr<nsIPersistentProperties> attributes =
+    do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
 
   TextAttrsMgr textAttrsMgr(this);
   textAttrsMgr.GetAttributes(attributes);
   return attributes.forget();
 }
 
 int32_t
 HyperTextAccessible::GetLevelInternal()
--- a/accessible/windows/msaa/ApplicationAccessibleWrap.cpp
+++ b/accessible/windows/msaa/ApplicationAccessibleWrap.cpp
@@ -6,32 +6,33 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ApplicationAccessibleWrap.h"
 
 #include "AccessibleApplication_i.c"
 #include "IUnknownImpl.h"
 
 #include "nsIGfxInfo.h"
-#include "nsPersistentProperties.h"
+#include "nsIPersistentProperties2.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/Services.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsISupports
 NS_IMPL_ISUPPORTS_INHERITED0(ApplicationAccessibleWrap,
                              ApplicationAccessible)
 
 already_AddRefed<nsIPersistentProperties>
 ApplicationAccessibleWrap::NativeAttributes()
 {
-  RefPtr<nsPersistentProperties> attributes = new nsPersistentProperties();
+  nsCOMPtr<nsIPersistentProperties> attributes =
+    do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
 
   nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
   if (gfxInfo) {
     bool isD2DEnabled = false;
     gfxInfo->GetD2DEnabled(&isD2DEnabled);
     nsAutoString unused;
     attributes->SetStringProperty(
       NS_LITERAL_CSTRING("D2D"),
--- a/accessible/xpcom/xpcAccessible.cpp
+++ b/accessible/xpcom/xpcAccessible.cpp
@@ -11,17 +11,17 @@
 #include "nsIAccessibleRole.h"
 #include "nsAccessibleRelation.h"
 #include "Relation.h"
 #include "Role.h"
 #include "RootAccessible.h"
 #include "xpcAccessibleDocument.h"
 
 #include "nsIMutableArray.h"
-#include "nsPersistentProperties.h"
+#include "nsIPersistentProperties2.h"
 
 using namespace mozilla::a11y;
 
 NS_IMETHODIMP
 xpcAccessible::GetParent(nsIAccessible** aParent)
 {
   NS_ENSURE_ARG_POINTER(aParent);
   *aParent = nullptr;
@@ -411,17 +411,18 @@ xpcAccessible::GetAttributes(nsIPersiste
     attributes.swap(*aAttributes);
     return NS_OK;
   }
 
   ProxyAccessible* proxy = IntlGeneric().AsProxy();
   AutoTArray<Attribute, 10> attrs;
   proxy->Attributes(&attrs);
 
-  RefPtr<nsPersistentProperties> props = new nsPersistentProperties();
+  nsCOMPtr<nsIPersistentProperties> props =
+    do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
   uint32_t attrCount = attrs.Length();
   nsAutoString unused;
   for (uint32_t i = 0; i < attrCount; i++) {
     props->SetStringProperty(attrs[i].Name(), attrs[i].Value(), unused);
   }
 
   props.forget(aAttributes);
   return NS_OK;
--- a/accessible/xul/XULTreeGridAccessible.cpp
+++ b/accessible/xul/XULTreeGridAccessible.cpp
@@ -13,17 +13,17 @@
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 #include "nsQueryObject.h"
 #include "nsTreeColumns.h"
 
 #include "nsIBoxObject.h"
 #include "nsIMutableArray.h"
-#include "nsPersistentProperties.h"
+#include "nsIPersistentProperties2.h"
 #include "nsITreeSelection.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/TreeColumnBinding.h"
 
 using namespace mozilla::a11y;
 using namespace mozilla;
 
@@ -641,17 +641,18 @@ XULTreeGridCellAccessible::Selected()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeGridCellAccessible: Accessible public implementation
 
 already_AddRefed<nsIPersistentProperties>
 XULTreeGridCellAccessible::NativeAttributes()
 {
-  RefPtr<nsPersistentProperties> attributes = new nsPersistentProperties();
+  nsCOMPtr<nsIPersistentProperties> attributes =
+    do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
 
   // "table-cell-index" attribute
   TableAccessible* table = Table();
   if (!table)
     return attributes.forget();
 
   nsAutoString stringIdx;
   stringIdx.AppendInt(table->CellIndexAt(mRow, ColIdx()));
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -45,17 +45,16 @@
 #include "mozilla/TimeStamp.h"
 #include "mozilla/Tuple.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/gfx/Scale.h"
 
 #include "GeckoProfiler.h"
 #include "gfx2DGlue.h"
 #include "gfxPrefs.h"
-#include "nsProperties.h"
 #include <algorithm>
 
 namespace mozilla {
 
 using namespace gfx;
 using namespace layers;
 
 namespace image {
@@ -1052,17 +1051,20 @@ RasterImage::Get(const char* prop, const
   }
   return mProperties->Get(prop, iid, result);
 }
 
 NS_IMETHODIMP
 RasterImage::Set(const char* prop, nsISupports* value)
 {
   if (!mProperties) {
-    mProperties = new nsProperties();
+    mProperties = do_CreateInstance("@mozilla.org/properties;1");
+  }
+  if (!mProperties) {
+    return NS_ERROR_OUT_OF_MEMORY;
   }
   return mProperties->Set(prop, value);
 }
 
 NS_IMETHODIMP
 RasterImage::Has(const char* prop, bool* _retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
--- a/image/imgRequest.cpp
+++ b/image/imgRequest.cpp
@@ -32,17 +32,16 @@
 #include "nsIScriptSecurityManager.h"
 #include "nsContentUtils.h"
 
 #include "plstr.h" // PL_strcasestr(...)
 #include "prtime.h" // for PR_Now
 #include "nsNetUtil.h"
 #include "nsIProtocolHandler.h"
 #include "imgIRequest.h"
-#include "nsProperties.h"
 
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/Telemetry.h"
 
 using namespace mozilla;
 using namespace mozilla::image;
 
 #define LOG_TEST(level) (MOZ_LOG_TEST(gImgLog, (level)))
@@ -104,17 +103,17 @@ imgRequest::Init(nsIURI *aURI,
   LOG_FUNC(gImgLog, "imgRequest::Init");
 
   MOZ_ASSERT(!mImage, "Multiple calls to init");
   MOZ_ASSERT(aURI, "No uri");
   MOZ_ASSERT(aFinalURI, "No final uri");
   MOZ_ASSERT(aRequest, "No request");
   MOZ_ASSERT(aChannel, "No channel");
 
-  mProperties = new nsProperties();
+  mProperties = do_CreateInstance("@mozilla.org/properties;1");
   mURI = aURI;
   mFinalURI = aFinalURI;
   mRequest = aRequest;
   mChannel = aChannel;
   mTimedChannel = do_QueryInterface(mChannel);
   mTriggeringPrincipal = aTriggeringPrincipal;
   mCORSMode = aCORSMode;
   mReferrerPolicy = aReferrerPolicy;
--- a/js/xpconnect/idl/xpccomponents.idl
+++ b/js/xpconnect/idl/xpccomponents.idl
@@ -12,17 +12,16 @@
 interface xpcIJSWeakReference;
 interface nsIClassInfo;
 interface nsICommandParams;
 interface nsIComponentManager;
 interface nsICycleCollectorListener;
 interface nsIEditorSpellCheck;
 interface nsIFile;
 interface nsILoadContext;
-interface nsIPersistentProperties;
 interface nsIURI;
 interface nsIJSCID;
 interface nsIJSIID;
 interface nsIPrincipal;
 interface nsIStackFrame;
 webidl Element;
 
 /**
@@ -727,19 +726,16 @@ interface nsIXPCComponents_Utils : nsISu
     /* Create a commandline object. */
     nsISupports createCommandLine();
 
     /* Create a loadcontext object. */
     nsILoadContext createLoadContext();
 
     /* Create a private loadcontext object. */
     nsILoadContext createPrivateLoadContext();
-
-    /* Create a persistent property object. */
-    nsIPersistentProperties createPersistentProperties();
 };
 
 /**
 * Interface for the 'Components' object.
 *
 * The first interface contains things that are available to non-chrome XBL code
 * that runs in a scope with an ExpandedPrincipal. The second interface
 * includes members that are only exposed to chrome.
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -39,17 +39,17 @@
 #include "nsIScriptError.h"
 #include "nsISimpleEnumerator.h"
 #include "nsPIDOMWindow.h"
 #include "nsGlobalWindow.h"
 #include "nsScriptError.h"
 #include "GeckoProfiler.h"
 #include "mozilla/EditorSpellCheck.h"
 #include "nsCommandLine.h"
-#include "nsPersistentProperties.h"
+#include "nsCommandParams.h"
 
 using namespace mozilla;
 using namespace JS;
 using namespace js;
 using namespace xpc;
 using mozilla::dom::Exception;
 
 /***************************************************************************/
@@ -3246,25 +3246,16 @@ NS_IMETHODIMP
 nsXPCComponents_Utils::CreatePrivateLoadContext(nsILoadContext** aLoadContext)
 {
     NS_ENSURE_ARG_POINTER(aLoadContext);
     nsCOMPtr<nsILoadContext> loadContext = ::CreatePrivateLoadContext();
     loadContext.forget(aLoadContext);
     return NS_OK;
 }
 
-NS_IMETHODIMP
-nsXPCComponents_Utils::CreatePersistentProperties(nsIPersistentProperties** aPersistentProperties)
-{
-    NS_ENSURE_ARG_POINTER(aPersistentProperties);
-    nsCOMPtr<nsIPersistentProperties> props = new nsPersistentProperties();
-    props.forget(aPersistentProperties);
-    return NS_OK;
-}
-
 /***************************************************************************/
 /***************************************************************************/
 /***************************************************************************/
 
 
 nsXPCComponentsBase::nsXPCComponentsBase(XPCWrappedNativeScope* aScope)
     :   mScope(aScope)
 {
--- a/netwerk/base/nsNetUtil.cpp
+++ b/netwerk/base/nsNetUtil.cpp
@@ -39,17 +39,17 @@
 #include "nsIInputStreamPump.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsILoadContext.h"
 #include "nsIMIMEHeaderParam.h"
 #include "nsIMutable.h"
 #include "nsINode.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsIOfflineCacheUpdate.h"
-#include "nsPersistentProperties.h"
+#include "nsIPersistentProperties2.h"
 #include "nsIPrivateBrowsingChannel.h"
 #include "nsIPropertyBag2.h"
 #include "nsIProtocolProxyService.h"
 #include "mozilla/net/RedirectChannelRegistrar.h"
 #include "nsIRequestObserverProxy.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsISensitiveInfoHiddenURI.h"
 #include "nsISimpleStreamListener.h"
@@ -2024,17 +2024,19 @@ NS_LoadPersistentPropertiesFromURISpec(n
                        nsContentUtils::GetSystemPrincipal(),
                        nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
                        nsIContentPolicy::TYPE_OTHER);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr<nsIInputStream> in;
     rv = channel->Open2(getter_AddRefs(in));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    RefPtr<nsPersistentProperties> properties = new nsPersistentProperties();
+    nsCOMPtr<nsIPersistentProperties> properties =
+      do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID, &rv);
+    NS_ENSURE_SUCCESS(rv, rv);
     rv = properties->Load(in);
     NS_ENSURE_SUCCESS(rv, rv);
 
     properties.swap(*outResult);
     return NS_OK;
 }
 
 bool
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -23,16 +23,18 @@
 #include "mozilla/layers/CompositorBridgeParent.h"
 #include "mozilla/dom/VideoDecoderManagerChild.h"
 
 #include "prlink.h"
 
 #include "nsCycleCollector.h"
 #include "nsObserverList.h"
 #include "nsObserverService.h"
+#include "nsProperties.h"
+#include "nsPersistentProperties.h"
 #include "nsScriptableInputStream.h"
 #include "nsBinaryStream.h"
 #include "nsStorageStream.h"
 #include "nsPipe.h"
 #include "nsScriptableBase64Encoder.h"
 
 #include "nsMemoryImpl.h"
 #include "nsDebugImpl.h"
@@ -204,16 +206,18 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryI
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsStorageStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsVersionComparatorImpl)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableBase64Encoder)
 
 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
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacUtilsImpl)
 #endif
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemInfo, Init)
 
@@ -250,16 +254,18 @@ NS_DEFINE_NAMED_CID(NS_CHROMEREGISTRY_CI
 NS_DEFINE_NAMED_CID(NS_CHROMEPROTOCOLHANDLER_CID);
 
 NS_DEFINE_NAMED_CID(NS_SECURITY_CONSOLE_MESSAGE_CID);
 
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsChromeRegistry,
                                          nsChromeRegistry::GetSingleton)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsChromeProtocolHandler)
 
+#define NS_PERSISTENTPROPERTIES_CID NS_IPERSISTENTPROPERTIES_CID /* sigh */
+
 static already_AddRefed<nsIFactory>
 CreateINIParserFactory(const mozilla::Module& aModule,
                        const mozilla::Module::CIDEntry& aEntry)
 {
   nsCOMPtr<nsIFactory> f = new nsINIParserFactory();
   return f.forget();
 }
 
--- a/xpcom/build/XPCOMModule.inc
+++ b/xpcom/build/XPCOMModule.inc
@@ -7,16 +7,20 @@
     COMPONENT(SCRIPTABLEINPUTSTREAM, nsScriptableInputStream::Create)
     COMPONENT(BINARYINPUTSTREAM, nsBinaryInputStreamConstructor)
     COMPONENT(BINARYOUTPUTSTREAM, nsBinaryOutputStreamConstructor)
     COMPONENT(STORAGESTREAM, nsStorageStreamConstructor)
     COMPONENT(VERSIONCOMPARATOR, nsVersionComparatorImplConstructor)
     COMPONENT(SCRIPTABLEBASE64ENCODER, nsScriptableBase64EncoderConstructor)
     COMPONENT(PIPE, nsPipeConstructor)
 
+    COMPONENT(PROPERTIES, nsPropertiesConstructor)
+
+    COMPONENT(PERSISTENTPROPERTIES, nsPersistentProperties::Create)
+
     COMPONENT(ARRAY, nsArrayBase::XPCOMConstructor)
     COMPONENT(CONSOLESERVICE, nsConsoleServiceConstructor)
     COMPONENT_M(OBSERVERSERVICE, nsObserverService::Create, Module::ALLOW_IN_GPU_PROCESS)
 
     COMPONENT_M(TIMER, nsTimerConstructor, Module::ALLOW_IN_GPU_PROCESS)
 
 #define COMPONENT_SUPPORTS(TYPE, Type)                                         \
   COMPONENT(SUPPORTS_##TYPE, nsSupports##Type##Constructor)
--- a/xpcom/ds/moz.build
+++ b/xpcom/ds/moz.build
@@ -56,19 +56,17 @@ EXPORTS += [
     'nsEnumeratorUtils.h',
     'nsExpirationTracker.h',
     'nsGkAtoms.h',
     'nsHashKeys.h',
     'nsHashPropertyBag.h',
     'nsInterfaceHashtable.h',
     'nsJSThingHashtable.h',
     'nsMathUtils.h',
-    'nsPersistentProperties.h',
     'nsPointerHashKeys.h',
-    'nsProperties.h',
     'nsQuickSort.h',
     'nsRefPtrHashtable.h',
     'nsSimpleEnumerator.h',
     'nsStaticAtomUtils.h',
     'nsStaticNameTable.h',
     'nsStringEnumerator.h',
     'nsSupportsPrimitives.h',
     'nsTArray-inl.h',
--- a/xpcom/ds/nsIPersistentProperties2.idl
+++ b/xpcom/ds/nsIPersistentProperties2.idl
@@ -53,8 +53,18 @@ interface nsIPersistentProperties : nsIP
    */
   AString setStringProperty(in AUTF8String key, in AString value);
 
 %{C++
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
 %}
 };
 
+
+%{C++
+
+#define NS_IPERSISTENTPROPERTIES_CID \
+{ 0x2245e573, 0x9464, 0x11d2, \
+  { 0x9b, 0x8b, 0x0, 0x80, 0x5f, 0x8a, 0x16, 0xd9 } }
+
+#define NS_PERSISTENTPROPERTIES_CONTRACTID "@mozilla.org/persistent-properties;1"
+
+%}
--- a/xpcom/ds/nsPersistentProperties.cpp
+++ b/xpcom/ds/nsPersistentProperties.cpp
@@ -454,16 +454,27 @@ nsPersistentProperties::SizeOfIncludingT
 {
   // The memory used by mTable is accounted for in mArena.
   size_t n = 0;
   n += mArena.SizeOfExcludingThis(aMallocSizeOf);
   n += mTable.ShallowSizeOfExcludingThis(aMallocSizeOf);
   return aMallocSizeOf(this) + n;
 }
 
+nsresult
+nsPersistentProperties::Create(nsISupports* aOuter, REFNSIID aIID,
+                               void** aResult)
+{
+  if (aOuter) {
+    return NS_ERROR_NO_AGGREGATION;
+  }
+  RefPtr<nsPersistentProperties> props = new nsPersistentProperties();
+  return props->QueryInterface(aIID, aResult);
+}
+
 NS_IMPL_ISUPPORTS(nsPersistentProperties, nsIPersistentProperties, nsIProperties)
 
 NS_IMETHODIMP
 nsPersistentProperties::Load(nsIInputStream* aIn)
 {
   nsresult rv = NS_NewUnicharInputStream(aIn, getter_AddRefs(mIn));
 
   if (rv != NS_OK) {
--- a/xpcom/ds/nsPersistentProperties.h
+++ b/xpcom/ds/nsPersistentProperties.h
@@ -20,16 +20,19 @@ class nsPersistentProperties final : pub
 {
 public:
   nsPersistentProperties();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPROPERTIES
   NS_DECL_NSIPERSISTENTPROPERTIES
 
+  static MOZ_MUST_USE nsresult
+  Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
+
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
 
 private:
   ~nsPersistentProperties();
 
 protected:
   nsCOMPtr<nsIUnicharInputStream> mIn;
 
--- a/xpcom/ds/nsProperties.h
+++ b/xpcom/ds/nsProperties.h
@@ -8,24 +8,32 @@
 #define nsProperties_h___
 
 #include "nsIProperties.h"
 #include "nsInterfaceHashtable.h"
 #include "nsHashKeys.h"
 #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<nsCharPtrHashKey,
                              nsISupports> nsProperties_HashBase;
 
 class nsProperties final
   : public nsIProperties
   , public nsProperties_HashBase
 {
 public:
   NS_DECL_AGGREGATED
   NS_DECL_NSIPROPERTIES
 
-  nsProperties() { NS_INIT_AGGREGATED(nullptr); }
+  explicit nsProperties(nsISupports *aOuter) { NS_INIT_AGGREGATED(aOuter); }
   ~nsProperties() {}
 };
 
 #endif /* nsProperties_h___ */
--- a/xpcom/tests/unit/test_bug121341.js
+++ b/xpcom/tests/unit/test_bug121341.js
@@ -4,17 +4,18 @@ ChromeUtils.import("resource://gre/modul
 function run_test() {
   var dataFile = do_get_file("data/bug121341.properties");
   var channel = NetUtil.newChannel({
     uri: Services.io.newFileURI(dataFile, null, null),
     loadUsingSystemPrincipal: true
   });
   var inp = channel.open2();
 
-  var properties = Cu.createPersistentProperties();
+  var properties = Cc["@mozilla.org/persistent-properties;1"].
+                   createInstance(Ci.nsIPersistentProperties);
   properties.load(inp);
 
   var value;
 
   value = properties.getStringProperty("1");
   Assert.equal(value, "abc");
 
   value = properties.getStringProperty("2");
@@ -50,15 +51,16 @@ function run_test() {
   dataFile = do_get_file("data/bug121341-2.properties");
 
   var channel2 = NetUtil.newChannel({
     uri: Services.io.newFileURI(dataFile, null, null),
     loadUsingSystemPrincipal: true
   });
   inp = channel2.open2();
 
-  var properties2 = Cu.createPersistentProperties();
+  var properties2 = Cc["@mozilla.org/persistent-properties;1"].
+                    createInstance(Ci.nsIPersistentProperties);
   try {
     properties2.load(inp);
     do_throw("load() didn't fail");
   } catch (e) {
   }
 }