Bug 1392884 - Remove nsIAtomService. r=froydnj.

It's no longer used, and we're in the process of making nsIAtom not usable from
scripts, so we don't want it to be used.
This commit is contained in:
Nicholas Nethercote 2017-08-25 17:06:58 +10:00
parent 2ff8041e36
commit d5f5450783
7 changed files with 0 additions and 92 deletions

View File

@ -60,7 +60,6 @@
#include "nsIArray.h"
#include "nsIAtom.h"
#include "nsIAtomService.h"
#include "nsICategoryManager.h"
#include "nsIClassInfo.h"
#include "nsIComponentManager.h"

View File

@ -76,7 +76,6 @@
#include "nsStringStream.h"
extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
#include "nsAtomService.h"
#include "nsAtomTable.h"
#include "nsISupportsImpl.h"
@ -204,7 +203,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsDouble)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsInterfacePointer)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsConsoleService, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAtomService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimer)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryOutputStream)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBinaryInputStream)

View File

@ -18,7 +18,6 @@
COMPONENT(ARRAY, nsArrayBase::XPCOMConstructor)
COMPONENT(CONSOLESERVICE, nsConsoleServiceConstructor)
COMPONENT(ATOMSERVICE, nsAtomServiceConstructor)
COMPONENT_M(OBSERVERSERVICE, nsObserverService::Create, Module::ALLOW_IN_GPU_PROCESS)
COMPONENT_M(TIMER, nsTimerConstructor, Module::ALLOW_IN_GPU_PROCESS)

View File

@ -8,7 +8,6 @@ XPIDL_SOURCES += [
'nsIArray.idl',
'nsIArrayExtensions.idl',
'nsIAtom.idl',
'nsIAtomService.idl',
'nsIHashable.idl',
'nsIINIParser.idl',
'nsIMutableArray.idl',
@ -44,7 +43,6 @@ EXPORTS += [
'nsArray.h',
'nsArrayEnumerator.h',
'nsArrayUtils.h',
'nsAtomService.h',
'nsBaseHashtable.h',
'nsCharSeparatedTokenizer.h',
'nsCheapSets.h',
@ -95,7 +93,6 @@ UNIFIED_SOURCES += [
'nsArray.cpp',
'nsArrayEnumerator.cpp',
'nsArrayUtils.cpp',
'nsAtomService.cpp',
'nsAtomTable.cpp',
'nsCOMArray.cpp',
'nsCRT.cpp',

View File

@ -1,25 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsAtomService.h"
#include "nsIAtom.h"
NS_IMPL_ISUPPORTS(nsAtomService, nsIAtomService)
nsAtomService::nsAtomService()
{
}
nsresult
nsAtomService::GetAtom(const nsAString& aString, nsIAtom** aResult)
{
*aResult = NS_Atomize(aString).take();
if (!*aResult) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
}

View File

@ -1,25 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __nsAtomService_h
#define __nsAtomService_h
#include "nsIAtomService.h"
#include "mozilla/Attributes.h"
class nsAtomService final : public nsIAtomService
{
public:
nsAtomService();
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIATOMSERVICE
private:
~nsAtomService() {}
};
#endif

View File

@ -1,35 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface nsIAtom;
%{C++
#define NS_ATOMSERVICE_CID \
{ /* ed3db3fc-0168-4cab-8818-98f5475a490c */ \
0xed3db3fc, \
0x0168, \
0x4cab, \
{0x88, 0x18, 0x98, 0xf5, 0x47, 0x5a, 0x49, 0x0c} }
#define NS_ATOMSERVICE_CONTRACTID "@mozilla.org/atom-service;1"
%}
/*
* Should this really be scriptable? Using atoms from script or proxies
* could be dangerous since double-wrapping could lead to loss of
* pointer identity.
*/
[scriptable, uuid(9c1f50b9-f9eb-42d4-a8cb-2c7600aeb241)]
interface nsIAtomService : nsISupports {
/**
* Version of NS_Atomize that doesn't require linking against the
* XPCOM library. See nsIAtom.idl.
*/
nsIAtom getAtom(in AString value);
};