Skip to content

Commit 4f3a44d

Browse files
author
dougt%netscape.com
committed
API Freeze for nsIServiceManager r=shaver@mozilla.org, sr=rpotts@netscape.com bug 99147
1 parent b792947 commit 4f3a44d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2343
-1058
lines changed

build/mac/build_scripts/MozillaBuildList.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ sub BuildClientDist()
571571
InstallFromManifest(":mozilla:xpcom:threads:MANIFEST_IDL", "$distdirectory:idl:");
572572
InstallFromManifest(":mozilla:xpcom:components:MANIFEST_IDL", "$distdirectory:idl:");
573573

574+
InstallFromManifest(":mozilla:xpcom:build:MANIFEST", "$distdirectory:xpcom:");
574575
InstallFromManifest(":mozilla:xpcom:glue:MANIFEST", "$distdirectory:xpcom:");
575576
InstallFromManifest(":mozilla:xpcom:base:MANIFEST", "$distdirectory:xpcom:");
576577
InstallFromManifest(":mozilla:xpcom:components:MANIFEST", "$distdirectory:xpcom:");

chrome/tools/chromereg/regchrome.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
int main(int argc, char **argv)
2727
{
28-
NS_InitXPCOM(nsnull, nsnull);
28+
NS_InitXPCOM2(nsnull, nsnull, nsnull);
2929

3030
nsCOMPtr <nsIChromeRegistry> chromeReg =
3131
do_GetService("@mozilla.org/chrome/chrome-registry;1");

config/bin2rc.exe

0 Bytes
Binary file not shown.

config/makecopy.exe

0 Bytes
Binary file not shown.

config/makedep.exe

0 Bytes
Binary file not shown.

config/mangle.exe

0 Bytes
Binary file not shown.

config/mantomak.exe

0 Bytes
Binary file not shown.

extensions/cookie/tests/TestCookie.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void GetACookie(nsICookieService *cookieService, const char* aSpec, char* *aCook
8989

9090
int main(PRInt32 argc, char *argv[])
9191
{
92-
nsresult rv = NS_InitXPCOM(nsnull, nsnull);
92+
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
9393
if (NS_FAILED(rv)) return -1;
9494

9595
// Create the Event Queue for this thread...

extensions/python/xpcom/src/xpcom.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ PyXPCOMMethod_GetGlobalServiceManager(PyObject *self, PyObject *args)
179179
{
180180
if (!PyArg_ParseTuple(args, ""))
181181
return NULL;
182-
nsIServiceManager* sm;
182+
nsIServiceManagerObsolete* sm;
183183
nsresult rv;
184184
Py_BEGIN_ALLOW_THREADS;
185-
rv = nsServiceManager::GetGlobalServiceManager(&sm);
185+
rv = nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&sm);
186186
Py_END_ALLOW_THREADS;
187187
if ( NS_FAILED(rv) )
188188
return PyXPCOM_BuildPyException(rv);
@@ -509,10 +509,10 @@ PRBool PyXPCOM_Globals_Ensure()
509509

510510
nsCOMPtr<nsILocalFile> ns_bin_dir;
511511
NS_NewLocalFile(landmark, PR_FALSE, getter_AddRefs(ns_bin_dir));
512-
nsresult rv = NS_InitXPCOM(nsnull, ns_bin_dir);
512+
nsresult rv = NS_InitXPCOM2(nsnull, ns_bin_dir, nsnull);
513513
#else
514514
// Elsewhere, Mozilla can find it itself (we hope!)
515-
nsresult rv = NS_InitXPCOM(nsnull, nsnull);
515+
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
516516
#endif // XP_WIN
517517
if (NS_FAILED(rv)) {
518518
PyErr_SetString(PyExc_RuntimeError, "The XPCOM subsystem could not be initialized");

extensions/xmlextras/tests/TestXMLExtras.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int main (int argc, char* argv[])
126126

127127
nsIServiceManager *servMgr;
128128

129-
rv = NS_InitXPCOM(&servMgr, nsnull);
129+
rv = NS_InitXPCOM2(&servMgr, nsnull, nsnull);
130130
if (NS_FAILED(rv)) return rv;
131131

132132
if (argc > 2) {

js/src/xpconnect/loader/mozJSComponentLoader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,8 @@ mozJSComponentLoader::AttemptRegistration(nsIFile *component,
835835
do_GetService(kObserverServiceContractID);
836836
if (observerService)
837837
{
838-
nsIServiceManager *mgr; // NO COMPtr as we dont release the service manager
839-
rv = nsServiceManager::GetGlobalServiceManager(&mgr);
838+
nsCOMPtr<nsIServiceManager> mgr;
839+
rv = NS_GetServiceManager(getter_AddRefs(mgr));
840840
if (NS_SUCCEEDED(rv))
841841
{
842842
// this string can't come from a string bundle, because we don't have string
@@ -900,8 +900,8 @@ mozJSComponentLoader::UnregisterComponent(nsIFile *component)
900900
do_GetService(kObserverServiceContractID);
901901
if (observerService)
902902
{
903-
nsIServiceManager *mgr; // NO COMPtr as we dont release the service manager
904-
rv = nsServiceManager::GetGlobalServiceManager(&mgr);
903+
nsCOMPtr<nsIServiceManager> mgr;
904+
rv = NS_GetServiceManager(getter_AddRefs(mgr));
905905
if (NS_SUCCEEDED(rv))
906906
{
907907
(void) observerService->Notify(mgr,

js/src/xpconnect/shell/xpcshell.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ main(int argc, char **argv)
834834
gErrFile = stderr;
835835
gOutFile = stdout;
836836

837-
rv = NS_InitXPCOM(NULL, NULL);
837+
rv = NS_InitXPCOM2(NULL, NULL, NULL);
838838
if (NS_FAILED(rv)) {
839839
printf("NS_InitXPCOM failed!\n");
840840
return 1;

layout/html/forms/src/nsFormFrame.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
100100
#include "nsIFormSubmitObserver.h"
101101
#include "nsIObserverService.h"
102102
#include "nsIServiceManager.h"
103+
#include "nsICategoryManager.h"
103104

104105
// Get base target for submission
105106
#include "nsIHTMLContent.h"

modules/libjar/test/TestJarCache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
163163
}
164164
filenames = argv + 1;
165165

166-
rv = NS_InitXPCOM(nsnull, nsnull);
166+
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
167167
if(NS_FAILED(rv))
168168
{
169169
printf("NS_InitXPCOM failed!\n");

modules/plugin/base/src/ns4xPlugin.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "ns4xPluginInstance.h"
4444
#include "ns4xPluginStreamListener.h"
4545
#include "nsIServiceManager.h"
46+
4647
#include "nsIMemory.h"
4748
#include "nsIPluginStreamListener.h"
4849
#include "nsPluginsDir.h"
@@ -79,7 +80,7 @@ static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);
7980
////////////////////////////////////////////////////////////////////////
8081
// Globals
8182
NPNetscapeFuncs ns4xPlugin::CALLBACKS;
82-
static nsIServiceManager* gServiceMgr = nsnull;
83+
static nsIServiceManagerObsolete* gServiceMgr = nsnull;
8384
static nsIMemory* gMalloc = nsnull;
8485

8586
////////////////////////////////////////////////////////////////////////
@@ -127,7 +128,7 @@ ns4xPlugin::CheckClassInitialized(void)
127128
// nsISupports stuff
128129
NS_IMPL_ISUPPORTS2(ns4xPlugin, nsIPlugin, nsIFactory);
129130

130-
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr)
131+
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManagerObsolete* serviceMgr)
131132
{
132133
NS_INIT_REFCNT();
133134
memset((void*) &fCallbacks, 0, sizeof(fCallbacks));
@@ -225,7 +226,7 @@ void ns4xPlugin::SetPluginRefNum(short aRefNum)
225226
//One ns4xPlugin object exists per Plugin (not instance).
226227

227228
nsresult
228-
ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
229+
ns4xPlugin::CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
229230
const char* aFileName,
230231
PRLibrary* aLibrary,
231232
nsIPlugin** aResult)
@@ -1119,10 +1120,10 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
11191120

11201121
case NPNVserviceManager: {
11211122
// GetGlobalServiceManager does not AddRef, so we do here.
1122-
nsIServiceManager* serviceManager;
1123-
res = nsServiceManager::GetGlobalServiceManager(&serviceManager);
1123+
nsIServiceManagerObsolete* serviceManager;
1124+
res = nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&serviceManager);
11241125
if (NS_SUCCEEDED(res)) {
1125-
*(nsIServiceManager**)result = serviceManager;
1126+
*(nsIServiceManagerObsolete**)result = serviceManager;
11261127
NS_ADDREF(serviceManager);
11271128
return NPERR_NO_ERROR;
11281129
} else

modules/plugin/base/src/ns4xPlugin.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ typedef NS_CALLBACK_(NPError, NP_PLUGINSHUTDOWN) (void);
7474
typedef NS_CALLBACK_(NPError, NP_MAIN) (NPNetscapeFuncs* nCallbacks, NPPluginFuncs* pCallbacks, NPP_ShutdownUPP* unloadUpp);
7575
#endif
7676

77-
class nsIServiceManager;
77+
class nsIServiceManagerObsolete;
7878
class nsIMemory;
7979

8080
////////////////////////////////////////////////////////////////////////
@@ -87,7 +87,7 @@ class ns4xPlugin : public nsIPlugin
8787
{
8888
public:
8989

90-
ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr);
90+
ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManagerObsolete* serviceMgr);
9191
virtual ~ns4xPlugin(void);
9292

9393
static void ReleaseStatics();
@@ -135,7 +135,7 @@ class ns4xPlugin : public nsIPlugin
135135
*/
136136

137137
static nsresult
138-
CreatePlugin(nsIServiceManager* aServiceMgr,
138+
CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
139139
const char* aFileName,
140140
PRLibrary* aLibrary,
141141
nsIPlugin** aResult);

modules/plugin/base/src/nsPluginHostImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,8 +4206,8 @@ NS_IMETHODIMP nsPluginHostImpl::GetPluginFactory(const char *aMimeType, nsIPlugi
42064206
{
42074207
// No, this is not a leak. GetGlobalServiceManager() doesn't
42084208
// addref the pointer on the way out. It probably should.
4209-
nsIServiceManager* serviceManager;
4210-
nsServiceManager::GetGlobalServiceManager(&serviceManager);
4209+
nsIServiceManagerObsolete* serviceManager;
4210+
nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&serviceManager);
42114211

42124212
// need to get the plugin factory from this plugin.
42134213
nsFactoryProc nsGetFactory = nsnull;

modules/plugin/base/src/nsPluginsDirUnix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
420420

421421
// No, this doesn't leak. GetGlobalServiceManager() doesn't addref
422422
// it's out pointer. Maybe it should.
423-
nsIServiceManager* mgr;
424-
nsServiceManager::GetGlobalServiceManager(&mgr);
423+
nsIServiceManagerObsolete* mgr;
424+
nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&mgr);
425425

426426
nsFactoryProc nsGetFactory =
427427
(nsFactoryProc) PR_FindSymbol(pLibrary, "NSGetFactory");

netwerk/test/TestCacheBlockFiles.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ main(void)
212212
nsresult rv = NS_OK;
213213

214214
// Start up XPCOM
215-
rv = NS_InitXPCOM(nsnull, nsnull);
215+
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
216216
if (NS_FAILED(rv)) return rv;
217217

218218
// Register components

netwerk/test/TestCacheService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ main(int argc, char* argv[])
183183
nsresult rv = NS_OK;
184184

185185
// Start up XPCOM
186-
rv = NS_InitXPCOM(nsnull, nsnull);
186+
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
187187
if (NS_FAILED(rv)) return rv;
188188

189189
/**

netwerk/test/TestCallbacks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int main(int argc, char *argv[]) {
249249
cmdLineURL = PR_TRUE;
250250
}
251251

252-
rv = NS_InitXPCOM(nsnull, nsnull);
252+
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
253253
if (NS_FAILED(rv)) return rv;
254254

255255
// Create the Event Queue for this thread...

netwerk/test/TestProtocols.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ main(int argc, char* argv[])
537537
up the event queues. Copied from TestSocketIO.cpp
538538
*/
539539

540-
rv = NS_InitXPCOM(nsnull, nsnull);
540+
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
541541
if (NS_FAILED(rv)) return rv;
542542

543543

netwerk/test/TestThreadedIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ main( int argc, char* argv[] ) {
269269

270270
// Initialize XPCOM.
271271
printf( "Initializing XPCOM...\n" );
272-
rv = NS_InitXPCOM( 0, 0 );
272+
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
273273
if ( NS_SUCCEEDED( rv ) ) {
274274
printf( "...XPCOM initialized OK\n" );
275275

0 commit comments

Comments
 (0)