Bug 1018103 - Remove support for the "JavaScript-global-static-nameset" category; r=bholley
The only in-tree consumer was removed in bug 1012320; the addons MXR and a web search suggest that it is unused outside the tree as well.
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIScriptExternalNameSet.h"
|
||||
#include "nsIScriptNameSpaceManager.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIInterfaceInfoManager.h"
|
||||
@@ -368,9 +367,6 @@ nsScriptNameSpaceManager::Init()
|
||||
rv = FillHash(cm, JAVASCRIPT_GLOBAL_PRIVILEGED_PROPERTY_CATEGORY);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = FillHash(cm, JAVASCRIPT_GLOBAL_STATIC_NAMESET_CATEGORY);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = FillHash(cm, JAVASCRIPT_NAVIGATOR_PROPERTY_CATEGORY);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
@@ -387,45 +383,6 @@ nsScriptNameSpaceManager::Init()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
struct NameSetClosure {
|
||||
nsIScriptContext* ctx;
|
||||
nsresult rv;
|
||||
};
|
||||
|
||||
static PLDHashOperator
|
||||
NameSetInitCallback(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
uint32_t number, void *arg)
|
||||
{
|
||||
GlobalNameMapEntry *entry = static_cast<GlobalNameMapEntry *>(hdr);
|
||||
|
||||
if (entry->mGlobalName.mType == nsGlobalNameStruct::eTypeStaticNameSet) {
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIScriptExternalNameSet> ns =
|
||||
do_CreateInstance(entry->mGlobalName.mCID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, PL_DHASH_NEXT);
|
||||
|
||||
NameSetClosure *closure = static_cast<NameSetClosure *>(arg);
|
||||
closure->rv = ns->InitializeNameSet(closure->ctx);
|
||||
if (NS_FAILED(closure->rv)) {
|
||||
NS_ERROR("Initing external script classes failed!");
|
||||
return PL_DHASH_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsScriptNameSpaceManager::InitForContext(nsIScriptContext *aContext)
|
||||
{
|
||||
NameSetClosure closure;
|
||||
closure.ctx = aContext;
|
||||
closure.rv = NS_OK;
|
||||
PL_DHashTableEnumerate(&mGlobalNames, NameSetInitCallback, &closure);
|
||||
|
||||
return closure.rv;
|
||||
}
|
||||
|
||||
nsGlobalNameStruct*
|
||||
nsScriptNameSpaceManager::LookupNameInternal(const nsAString& aName,
|
||||
const char16_t **aClassName)
|
||||
@@ -619,8 +576,6 @@ nsScriptNameSpaceManager::OperateCategoryEntryHash(nsICategoryManager* aCategory
|
||||
type = nsGlobalNameStruct::eTypeProperty;
|
||||
} else if (strcmp(aCategory, JAVASCRIPT_NAVIGATOR_PROPERTY_CATEGORY) == 0) {
|
||||
type = nsGlobalNameStruct::eTypeNavigatorProperty;
|
||||
} else if (strcmp(aCategory, JAVASCRIPT_GLOBAL_STATIC_NAMESET_CATEGORY) == 0) {
|
||||
type = nsGlobalNameStruct::eTypeStaticNameSet;
|
||||
} else {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user