Bug 1442039 part 7. Remove now-unused nsScriptNameSpaceManager::RegisterClassName. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 21 Mar 2018 23:13:29 -0400
changeset 409442 9a44d04d09bf67136878d90299f4776f0ab355fe
parent 409441 b4492fdf4a10d3ffef5608f1d63e1b2191ad841a
child 409443 316552bee730350bead5906cc82aaa506f751b91
push id33687
push userapavel@mozilla.com
push dateThu, 22 Mar 2018 09:31:48 +0000
treeherdermozilla-central@7771df14ea18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1442039
milestone61.0a1
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
Bug 1442039 part 7. Remove now-unused nsScriptNameSpaceManager::RegisterClassName. r=peterv MozReview-Commit-ID: 9mpz8o29WGp
dom/base/nsScriptNameSpaceManager.cpp
dom/base/nsScriptNameSpaceManager.h
--- a/dom/base/nsScriptNameSpaceManager.cpp
+++ b/dom/base/nsScriptNameSpaceManager.cpp
@@ -197,41 +197,16 @@ nsScriptNameSpaceManager::LookupName(con
 
   if (aClassName) {
     *aClassName = nullptr;
   }
   return nullptr;
 }
 
 nsresult
-nsScriptNameSpaceManager::RegisterClassName(const char *aClassName,
-                                            int32_t aDOMClassInfoID,
-                                            const char16_t **aResult)
-{
-  if (!nsCRT::IsAscii(aClassName)) {
-    NS_ERROR("Trying to register a non-ASCII class name");
-    return NS_OK;
-  }
-  nsGlobalNameStruct *s = AddToHash(aClassName, aResult);
-  NS_ENSURE_TRUE(s, NS_ERROR_OUT_OF_MEMORY);
-
-  if (s->mType == nsGlobalNameStruct::eTypeClassConstructor) {
-    return NS_OK;
-  }
-
-  NS_ASSERTION(s->mType == nsGlobalNameStruct::eTypeNotInitialized,
-               "Whaaa, JS environment name clash!");
-
-  s->mType = nsGlobalNameStruct::eTypeClassConstructor;
-  s->mDOMClassInfoID = aDOMClassInfoID;
-
-  return NS_OK;
-}
-
-nsresult
 nsScriptNameSpaceManager::OperateCategoryEntryHash(nsICategoryManager* aCategoryManager,
                                                    const char* aCategory,
                                                    nsISupports* aEntry,
                                                    bool aRemove)
 {
   MOZ_ASSERT(aCategoryManager);
   // Get the type from the category name.
   // NOTE: we could have passed the type in FillHash() and guessed it in
--- a/dom/base/nsScriptNameSpaceManager.h
+++ b/dom/base/nsScriptNameSpaceManager.h
@@ -66,20 +66,16 @@ public:
   // Returns a nsGlobalNameStruct for aName, or null if one is not
   // found. The returned nsGlobalNameStruct is only guaranteed to be
   // valid until the next call to any of the methods in this class.
   // It also returns a pointer to the string buffer of the classname
   // in the nsGlobalNameStruct.
   const nsGlobalNameStruct* LookupName(const nsAString& aName,
                                        const char16_t **aClassName = nullptr);
 
-  nsresult RegisterClassName(const char *aClassName,
-                             int32_t aDOMClassInfoID,
-                             const char16_t **aResult);
-
   class NameIterator : public PLDHashTable::Iterator
   {
   public:
     typedef PLDHashTable::Iterator Base;
     explicit NameIterator(PLDHashTable* aTable) : Base(aTable) {}
     NameIterator(NameIterator&& aOther) : Base(mozilla::Move(aOther.mTable)) {}
 
     const GlobalNameMapEntry* Get() const