Skip to content

Commit

Permalink
Bug 1306327 - Remove everything related to frozen functions from the …
Browse files Browse the repository at this point in the history
…XPCOM glue. r=bsmedberg

Now that nothing is using those functions, we can remove them and limit
the scope of the standalone glue to initialize the new Bootstrap API.

--HG--
extra : rebase_source : b73845a207f8d6e632c46d089a00b7a67e1648fc
  • Loading branch information
glandium committed Jan 10, 2017
1 parent 2330dcf commit 6da931c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 915 deletions.
1 change: 0 additions & 1 deletion js/src/devtools/rootAnalysis/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var ignoreClasses = {
"JSLocaleCallbacks" : true,
"JSC::ExecutableAllocator" : true,
"PRIOMethods": true,
"XPCOMFunctions" : true, // I'm a little unsure of this one
"_MD_IOVector" : true,
"malloc_table_t": true, // replace_malloc
"malloc_hook_table_t": true, // replace_malloc
Expand Down
138 changes: 0 additions & 138 deletions xpcom/build/FrozenFunctions.cpp

This file was deleted.

1 change: 0 additions & 1 deletion xpcom/build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ UNIFIED_SOURCES += xpcom_gluens_src_cppsrcs
UNIFIED_SOURCES += xpcom_glue_src_cppsrcs

UNIFIED_SOURCES += [
'FrozenFunctions.cpp',
'IOInterposer.cpp',
'LateWriteChecks.cpp',
'MainThreadIOLogger.cpp',
Expand Down
181 changes: 0 additions & 181 deletions xpcom/build/nsXPCOMPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@

#include "nscore.h"
#include "nsXPCOM.h"
#include "nsXPCOMStrings.h"
#include "xptcall.h"

class nsStringContainer;
class nsCStringContainer;
class nsPurpleBufferEntry;

/**
* During this shutdown notification all threads which run XPCOM code must
* be joined.
Expand All @@ -29,178 +24,6 @@ class nsPurpleBufferEntry;
#define NS_XPCOM_SHUTDOWN_LOADERS_OBSERVER_ID "xpcom-shutdown-loaders"

// PUBLIC
typedef nsresult (*InitFunc)(nsIServiceManager** aResult,
nsIFile* aBinDirectory,
nsIDirectoryServiceProvider* aAppFileLocationProvider);
typedef nsresult (*ShutdownFunc)(nsIServiceManager* aServMgr);
typedef nsresult (*GetServiceManagerFunc)(nsIServiceManager** aResult);
typedef nsresult (*GetComponentManagerFunc)(nsIComponentManager** aResult);
typedef nsresult (*GetComponentRegistrarFunc)(nsIComponentRegistrar** aResult);
typedef nsresult (*GetMemoryManagerFunc)(nsIMemory** aResult);
typedef nsresult (*NewLocalFileFunc)(const nsAString& aPath,
bool aFollowLinks, nsIFile** aResult);
typedef nsresult (*NewNativeLocalFileFunc)(const nsACString& aPath,
bool aFollowLinks,
nsIFile** aResult);

typedef nsresult (*GetDebugFunc)(nsIDebug2** aResult);

typedef nsresult (*StringContainerInitFunc)(nsStringContainer&);
typedef nsresult (*StringContainerInit2Func)(nsStringContainer&,
const char16_t*,
uint32_t, uint32_t);
typedef void (*StringContainerFinishFunc)(nsStringContainer&);
typedef uint32_t (*StringGetDataFunc)(const nsAString&, const char16_t**,
bool*);
typedef uint32_t (*StringGetMutableDataFunc)(nsAString&, uint32_t,
char16_t**);
typedef char16_t* (*StringCloneDataFunc)(const nsAString&);
typedef nsresult (*StringSetDataFunc)(nsAString&, const char16_t*, uint32_t);
typedef nsresult (*StringSetDataRangeFunc)(nsAString&, uint32_t, uint32_t,
const char16_t*, uint32_t);
typedef nsresult (*StringCopyFunc)(nsAString&, const nsAString&);
typedef void (*StringSetIsVoidFunc)(nsAString&, const bool);
typedef bool (*StringGetIsVoidFunc)(const nsAString&);

typedef nsresult (*CStringContainerInitFunc)(nsCStringContainer&);
typedef nsresult (*CStringContainerInit2Func)(nsCStringContainer&,
const char*,
uint32_t, uint32_t);
typedef void (*CStringContainerFinishFunc)(nsCStringContainer&);
typedef uint32_t (*CStringGetDataFunc)(const nsACString&, const char**,
bool*);
typedef uint32_t (*CStringGetMutableDataFunc)(nsACString&, uint32_t, char**);
typedef char* (*CStringCloneDataFunc)(const nsACString&);
typedef nsresult (*CStringSetDataFunc)(nsACString&, const char*, uint32_t);
typedef nsresult (*CStringSetDataRangeFunc)(nsACString&, uint32_t, uint32_t,
const char*, uint32_t);
typedef nsresult (*CStringCopyFunc)(nsACString&, const nsACString&);
typedef void (*CStringSetIsVoidFunc)(nsACString&, const bool);
typedef bool (*CStringGetIsVoidFunc)(const nsACString&);

typedef nsresult (*CStringToUTF16)(const nsACString&, nsCStringEncoding,
nsAString&);
typedef nsresult (*UTF16ToCString)(const nsAString&, nsCStringEncoding,
nsACString&);

typedef void* (*AllocFunc)(size_t aSize);
typedef void* (*ReallocFunc)(void* aPtr, size_t aSize);
typedef void (*FreeFunc)(void* aPtr);

typedef void (*DebugBreakFunc)(uint32_t aSeverity,
const char* aStr, const char* aExpr,
const char* aFile, int32_t aLine);

typedef void (*xpcomVoidFunc)();
typedef void (*LogAddRefFunc)(void*, nsrefcnt, const char*, uint32_t);
typedef void (*LogReleaseFunc)(void*, nsrefcnt, const char*);
typedef void (*LogCtorFunc)(void*, const char*, uint32_t);
typedef void (*LogCOMPtrFunc)(void*, nsISupports*);

typedef nsresult (*GetXPTCallStubFunc)(REFNSIID, nsIXPTCProxy*,
nsISomeInterface**);
typedef void (*DestroyXPTCallStubFunc)(nsISomeInterface*);
typedef nsresult (*InvokeByIndexFunc)(nsISupports*, uint32_t, uint32_t,
nsXPTCVariant*);
typedef bool (*CycleCollectorFunc)(nsISupports*);
typedef nsPurpleBufferEntry*
(*CycleCollectorSuspect2Func)(void*,
nsCycleCollectionParticipant*);
typedef bool (*CycleCollectorForget2Func)(nsPurpleBufferEntry*);
typedef void (*CycleCollectorSuspect3Func)(void*,
nsCycleCollectionParticipant*,
nsCycleCollectingAutoRefCnt*,
bool*);
// PRIVATE AND DEPRECATED
typedef NS_CALLBACK_(nsresult, XPCOMExitRoutine)(void);

typedef nsresult (*RegisterXPCOMExitRoutineFunc)(XPCOMExitRoutine aExitRoutine,
uint32_t aPriority);
typedef nsresult (*UnregisterXPCOMExitRoutineFunc)(XPCOMExitRoutine aExitRoutine);

typedef struct XPCOMFunctions
{
uint32_t version;
uint32_t size;

InitFunc init;
ShutdownFunc shutdown;
GetServiceManagerFunc getServiceManager;
GetComponentManagerFunc getComponentManager;
GetComponentRegistrarFunc getComponentRegistrar;
GetMemoryManagerFunc getMemoryManager;
NewLocalFileFunc newLocalFile;
NewNativeLocalFileFunc newNativeLocalFile;

RegisterXPCOMExitRoutineFunc registerExitRoutine;
UnregisterXPCOMExitRoutineFunc unregisterExitRoutine;

// Added for Mozilla 1.5
GetDebugFunc getDebug;
void* getTraceRefcnt;

// Added for Mozilla 1.7
StringContainerInitFunc stringContainerInit;
StringContainerFinishFunc stringContainerFinish;
StringGetDataFunc stringGetData;
StringSetDataFunc stringSetData;
StringSetDataRangeFunc stringSetDataRange;
StringCopyFunc stringCopy;
CStringContainerInitFunc cstringContainerInit;
CStringContainerFinishFunc cstringContainerFinish;
CStringGetDataFunc cstringGetData;
CStringSetDataFunc cstringSetData;
CStringSetDataRangeFunc cstringSetDataRange;
CStringCopyFunc cstringCopy;
CStringToUTF16 cstringToUTF16;
UTF16ToCString utf16ToCString;
StringCloneDataFunc stringCloneData;
CStringCloneDataFunc cstringCloneData;

// Added for Mozilla 1.8
AllocFunc allocFunc;
ReallocFunc reallocFunc;
FreeFunc freeFunc;
StringContainerInit2Func stringContainerInit2;
CStringContainerInit2Func cstringContainerInit2;
StringGetMutableDataFunc stringGetMutableData;
CStringGetMutableDataFunc cstringGetMutableData;
void* init3; // obsolete

// Added for Mozilla 1.9
DebugBreakFunc debugBreakFunc;
xpcomVoidFunc logInitFunc;
xpcomVoidFunc logTermFunc;
LogAddRefFunc logAddRefFunc;
LogReleaseFunc logReleaseFunc;
LogCtorFunc logCtorFunc;
LogCtorFunc logDtorFunc;
LogCOMPtrFunc logCOMPtrAddRefFunc;
LogCOMPtrFunc logCOMPtrReleaseFunc;
GetXPTCallStubFunc getXPTCallStubFunc;
DestroyXPTCallStubFunc destroyXPTCallStubFunc;
InvokeByIndexFunc invokeByIndexFunc;
CycleCollectorFunc cycleSuspectFunc; // obsolete: use cycleSuspect3Func
CycleCollectorFunc cycleForgetFunc; // obsolete
StringSetIsVoidFunc stringSetIsVoid;
StringGetIsVoidFunc stringGetIsVoid;
CStringSetIsVoidFunc cstringSetIsVoid;
CStringGetIsVoidFunc cstringGetIsVoid;

// Added for Mozilla 1.9.1
CycleCollectorSuspect2Func cycleSuspect2Func; // obsolete: use cycleSuspect3Func
CycleCollectorForget2Func cycleForget2Func; // obsolete

CycleCollectorSuspect3Func cycleSuspect3Func;

} XPCOMFunctions;

typedef nsresult (*GetFrozenFunctionsFunc)(XPCOMFunctions* aEntryPoints,
const char* aLibraryPath);
XPCOM_API(nsresult) NS_GetFrozenFunctions(XPCOMFunctions* aEntryPoints,
const char* aLibraryPath);


namespace mozilla {

/**
Expand All @@ -227,10 +50,6 @@ void LogTerm();
} // namespace mozilla


// think hard before changing this
#define XPCOM_GLUE_VERSION 1


/* XPCOM Specific Defines
*
* XPCOM_DLL - name of the loadable xpcom library on disk.
Expand Down
6 changes: 1 addition & 5 deletions xpcom/glue/standalone/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['staticruntime']

include('../objs.mozbuild')

SOURCES += xpcom_glue_src_cppsrcs

SOURCES += [
'../nsStringAPI.cpp',
'../FileUtils.cpp',
'nsXPCOMGlue.cpp',
]

Expand Down
Loading

0 comments on commit 6da931c

Please sign in to comment.