mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backout changeset f12e5c87adf6 (bug 852950) because it breaks running from dist/bin
This commit is contained in:
parent
202e1980aa
commit
8cf8cff7ce
@ -54,6 +54,7 @@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
|
||||
#ifdef MOZ_DMD
|
||||
@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
|
||||
|
@ -20,4 +20,3 @@ components/dom_sms.xpt
|
||||
@DLL_PREFIX@nssutil3@DLL_SUFFIX@
|
||||
@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||
#endif
|
||||
@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
|
@ -69,6 +69,7 @@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/XUL
|
||||
#else
|
||||
|
@ -26,7 +26,6 @@
|
||||
@DLL_PREFIX@nssutil3@DLL_SUFFIX@
|
||||
@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||
#endif
|
||||
@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
LICENSE
|
||||
browserconfig.properties
|
||||
chrome/US.jar
|
||||
|
26
configure.in
26
configure.in
@ -1019,10 +1019,10 @@ MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)'
|
||||
|
||||
MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)'
|
||||
MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)'
|
||||
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxul -lxpcom_core -lmozalloc'
|
||||
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core -lmozalloc'
|
||||
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
|
||||
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxul -lmozalloc'
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS)'
|
||||
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom -lmozalloc'
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
|
||||
XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
|
||||
XPCOM_STANDALONE_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX)'
|
||||
|
||||
@ -2116,8 +2116,8 @@ ia64*-hpux*)
|
||||
# mingw doesn't require kernel32, user32, and advapi32 explicitly
|
||||
LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32 -lnetapi32"
|
||||
MOZ_FIX_LINK_PATHS=
|
||||
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxul -lxpcom_core -lmozalloc'
|
||||
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxul -lmozalloc'
|
||||
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core -lmozalloc'
|
||||
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom -lmozalloc'
|
||||
DLL_PREFIX=
|
||||
IMPORT_LIB_SUFFIX=dll.a
|
||||
|
||||
@ -2182,9 +2182,9 @@ ia64*-hpux*)
|
||||
WARNINGS_AS_ERRORS='-WX'
|
||||
MOZ_OPTIMIZE_FLAGS='-O1'
|
||||
MOZ_FIX_LINK_PATHS=
|
||||
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
|
||||
LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
|
||||
dnl For profile-guided optimization
|
||||
@ -2358,8 +2358,8 @@ ia64*-hpux*)
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline"
|
||||
MOZ_OPTIMIZE_FLAGS="-O2"
|
||||
MOZ_OPTIMIZE_LDFLAGS="-s -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
|
||||
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
TARGET_MD_ARCH=os2
|
||||
_PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
|
||||
RC=rc.exe
|
||||
@ -4582,8 +4582,7 @@ cairo-cocoa)
|
||||
TK_CFLAGS="-DNO_X11"
|
||||
CFLAGS="$CFLAGS $TK_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
|
||||
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/bin/XUL -lxpcom_core -lmozalloc'
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/bin/XUL -lmozalloc'
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
MOZ_FS_LAYOUT=bundle
|
||||
MOZ_WEBGL=1
|
||||
@ -4598,8 +4597,7 @@ cairo-uikit)
|
||||
TK_LIBS='-framework Foundation -framework CoreFoundation -framework CoreGraphics -framework CoreText'
|
||||
CFLAGS="$CFLAGS $TK_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
|
||||
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/bin/XUL -lxpcom_core -lmozalloc'
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/bin/XUL -lmozalloc'
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
MOZ_FS_LAYOUT=bundle
|
||||
;;
|
||||
|
@ -40,6 +40,7 @@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@
|
||||
|
@ -224,9 +224,11 @@ loadGeckoLibs(const char *apkName)
|
||||
file_ids = (char *)extractBuf("lib.id", zip);
|
||||
#endif
|
||||
|
||||
char *file = new char[strlen(apkName) + sizeof("!/libxul.so")];
|
||||
sprintf(file, "%s!/libxul.so", apkName);
|
||||
xul_handle = __wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
|
||||
char *file = new char[strlen(apkName) + sizeof("!/libxpcom.so")];
|
||||
sprintf(file, "%s!/libxpcom.so", apkName);
|
||||
__wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
|
||||
// libxul.so is pulled from libxpcom.so, so we don't need to give the full path
|
||||
xul_handle = __wrap_dlopen("libxul.so", RTLD_GLOBAL | RTLD_LAZY);
|
||||
delete[] file;
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
@ -686,8 +686,3 @@ ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_PROFILE_USE))
|
||||
# Wrap linker to measure peak virtual memory usage.
|
||||
LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD)
|
||||
endif
|
||||
|
||||
libs:: $(FINAL_TARGET)/dependentlibs.list
|
||||
|
||||
$(FINAL_TARGET)/dependentlibs.list: dependentlibs.py $(SHARED_LIBRARY) $(wildcard $(if $(wildcard $(FINAL_TARGET)/dependentlibs.list),$(addprefix $(FINAL_TARGET)/,$(shell cat $(FINAL_TARGET)/dependentlibs.list))))
|
||||
$(PYTHON) $< $(SHARED_LIBRARY) -L $(FINAL_TARGET) $(if $(TOOLCHAIN_PREFIX),$(addprefix -p ,$(TOOLCHAIN_PREFIX))) > $@
|
||||
|
@ -206,6 +206,7 @@ add_tier_dir('platform', app_libxul_dirs)
|
||||
add_tier_dir('platform', app_libxul_static_dirs, static=True)
|
||||
|
||||
add_tier_dir('platform', 'toolkit/library')
|
||||
add_tier_dir('platform', 'xpcom/stub')
|
||||
|
||||
if CONFIG['MOZ_REPLACE_MALLOC']:
|
||||
add_tier_dir('platform', 'memory/replace')
|
||||
|
@ -1,131 +0,0 @@
|
||||
/* 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 "nsXPCOM.h"
|
||||
#include "nsXPCOMPrivate.h"
|
||||
#include "nsXPCOMStrings.h"
|
||||
#include "xptcall.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Private Method to register an exit routine. This method
|
||||
* used to allow you to setup a callback that will be called from
|
||||
* the NS_ShutdownXPCOM function after all services and
|
||||
* components have gone away. It was fatally flawed in that the component
|
||||
* DLL could be released before the exit function was called; it is now a
|
||||
* stub implementation that does nothing.
|
||||
*/
|
||||
XPCOM_API(nsresult)
|
||||
NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, uint32_t priority);
|
||||
|
||||
XPCOM_API(nsresult)
|
||||
NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine);
|
||||
|
||||
static const XPCOMFunctions kFrozenFunctions = {
|
||||
XPCOM_GLUE_VERSION,
|
||||
sizeof(XPCOMFunctions),
|
||||
&NS_InitXPCOM2,
|
||||
&NS_ShutdownXPCOM,
|
||||
&NS_GetServiceManager,
|
||||
&NS_GetComponentManager,
|
||||
&NS_GetComponentRegistrar,
|
||||
&NS_GetMemoryManager,
|
||||
&NS_NewLocalFile,
|
||||
&NS_NewNativeLocalFile,
|
||||
&NS_RegisterXPCOMExitRoutine,
|
||||
&NS_UnregisterXPCOMExitRoutine,
|
||||
|
||||
// these functions were added post 1.4
|
||||
&NS_GetDebug,
|
||||
&NS_GetTraceRefcnt,
|
||||
|
||||
// these functions were added post 1.6
|
||||
&NS_StringContainerInit,
|
||||
&NS_StringContainerFinish,
|
||||
&NS_StringGetData,
|
||||
&NS_StringSetData,
|
||||
&NS_StringSetDataRange,
|
||||
&NS_StringCopy,
|
||||
&NS_CStringContainerInit,
|
||||
&NS_CStringContainerFinish,
|
||||
&NS_CStringGetData,
|
||||
&NS_CStringSetData,
|
||||
&NS_CStringSetDataRange,
|
||||
&NS_CStringCopy,
|
||||
&NS_CStringToUTF16,
|
||||
&NS_UTF16ToCString,
|
||||
&NS_StringCloneData,
|
||||
&NS_CStringCloneData,
|
||||
|
||||
// these functions were added post 1.7 (post Firefox 1.0)
|
||||
&NS_Alloc,
|
||||
&NS_Realloc,
|
||||
&NS_Free,
|
||||
&NS_StringContainerInit2,
|
||||
&NS_CStringContainerInit2,
|
||||
&NS_StringGetMutableData,
|
||||
&NS_CStringGetMutableData,
|
||||
NULL,
|
||||
|
||||
// these functions were added post 1.8
|
||||
&NS_DebugBreak,
|
||||
&NS_LogInit,
|
||||
&NS_LogTerm,
|
||||
&NS_LogAddRef,
|
||||
&NS_LogRelease,
|
||||
&NS_LogCtor,
|
||||
&NS_LogDtor,
|
||||
&NS_LogCOMPtrAddRef,
|
||||
&NS_LogCOMPtrRelease,
|
||||
&NS_GetXPTCallStub,
|
||||
&NS_DestroyXPTCallStub,
|
||||
&NS_InvokeByIndex,
|
||||
nullptr,
|
||||
nullptr,
|
||||
&NS_StringSetIsVoid,
|
||||
&NS_StringGetIsVoid,
|
||||
&NS_CStringSetIsVoid,
|
||||
&NS_CStringGetIsVoid,
|
||||
|
||||
// these functions were added post 1.9
|
||||
&NS_CycleCollectorSuspect2,
|
||||
&NS_CycleCollectorForget2
|
||||
};
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetFrozenFunctions(XPCOMFunctions *functions, const char* /* libraryPath */)
|
||||
{
|
||||
if (!functions)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (functions->version != XPCOM_GLUE_VERSION)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
uint32_t size = functions->size;
|
||||
if (size > sizeof(XPCOMFunctions))
|
||||
size = sizeof(XPCOMFunctions);
|
||||
|
||||
size -= offsetof(XPCOMFunctions, init);
|
||||
|
||||
memcpy(&functions->init, &kFrozenFunctions.init, size);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs for nsXPCOMPrivate.h
|
||||
*/
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, uint32_t priority)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
@ -38,7 +38,6 @@ CPPSRCS = \
|
||||
Services.cpp \
|
||||
Omnijar.cpp \
|
||||
FileLocation.cpp \
|
||||
FrozenFunctions.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifeq (Darwin, $(OS_ARCH))
|
||||
|
@ -6,6 +6,34 @@
|
||||
#ifndef nsXPCOM_h__
|
||||
#define nsXPCOM_h__
|
||||
|
||||
/* Map frozen functions to private symbol names if not using strict API. */
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
# define NS_InitXPCOM2 NS_InitXPCOM2_P
|
||||
# define NS_ShutdownXPCOM NS_ShutdownXPCOM_P
|
||||
# define NS_GetServiceManager NS_GetServiceManager_P
|
||||
# define NS_GetComponentManager NS_GetComponentManager_P
|
||||
# define NS_GetComponentRegistrar NS_GetComponentRegistrar_P
|
||||
# define NS_GetMemoryManager NS_GetMemoryManager_P
|
||||
# define NS_NewLocalFile NS_NewLocalFile_P
|
||||
# define NS_NewNativeLocalFile NS_NewNativeLocalFile_P
|
||||
# define NS_GetDebug NS_GetDebug_P
|
||||
# define NS_GetTraceRefcnt NS_GetTraceRefcnt_P
|
||||
# define NS_Alloc NS_Alloc_P
|
||||
# define NS_Realloc NS_Realloc_P
|
||||
# define NS_Free NS_Free_P
|
||||
# define NS_DebugBreak NS_DebugBreak_P
|
||||
# define NS_LogInit NS_LogInit_P
|
||||
# define NS_LogTerm NS_LogTerm_P
|
||||
# define NS_LogAddRef NS_LogAddRef_P
|
||||
# define NS_LogRelease NS_LogRelease_P
|
||||
# define NS_LogCtor NS_LogCtor_P
|
||||
# define NS_LogDtor NS_LogDtor_P
|
||||
# define NS_LogCOMPtrAddRef NS_LogCOMPtrAddRef_P
|
||||
# define NS_LogCOMPtrRelease NS_LogCOMPtrRelease_P
|
||||
# define NS_CycleCollectorSuspect2 NS_CycleCollectorSuspect2_P
|
||||
# define NS_CycleCollectorForget2 NS_CycleCollectorForget2_P
|
||||
#endif
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsXPCOMCID.h"
|
||||
|
||||
|
@ -217,15 +217,15 @@ void LogTerm();
|
||||
#define XPCOM_SEARCH_KEY "PATH"
|
||||
#define GRE_CONF_NAME "gre.config"
|
||||
#define GRE_WIN_REG_LOC L"Software\\mozilla.org\\GRE"
|
||||
#define XPCOM_DLL XUL_DLL
|
||||
#define LXPCOM_DLL LXUL_DLL
|
||||
#define XPCOM_DLL "xpcom.dll"
|
||||
#define LXPCOM_DLL L"xpcom.dll"
|
||||
#define XUL_DLL "xul.dll"
|
||||
#define LXUL_DLL L"xul.dll"
|
||||
|
||||
#else // Unix
|
||||
#include <limits.h> // for PATH_MAX
|
||||
|
||||
#define XPCOM_DLL XUL_DLL
|
||||
#define XPCOM_DLL "libxpcom" MOZ_DLL_SUFFIX
|
||||
|
||||
// you have to love apple..
|
||||
#ifdef XP_MACOSX
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "mozilla/threads/nsThreadIDs.h"
|
||||
|
||||
#if defined(MOZILLA_INTERNAL_API)
|
||||
#define NS_IsCycleCollectorThread NS_IsCycleCollectorThread_P
|
||||
#if defined(XP_WIN)
|
||||
bool NS_IsCycleCollectorThread();
|
||||
#elif defined(NS_TLS)
|
||||
|
@ -19,6 +19,23 @@
|
||||
#include "mozilla/threads/nsThreadIDs.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
// This is needed on some systems to prevent collisions between the symbols
|
||||
// appearing in xpcom_core and xpcomglue. It may be unnecessary in the future
|
||||
// with better toolchain support.
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
# define NS_SetThreadName NS_SetThreadName_P
|
||||
# define NS_NewThread NS_NewThread_P
|
||||
# define NS_NewNamedThread NS_NewNamedThread_P
|
||||
# define NS_GetCurrentThread NS_GetCurrentThread_P
|
||||
# define NS_GetMainThread NS_GetMainThread_P
|
||||
# define NS_IsMainThread NS_IsMainThread_P
|
||||
# define NS_DispatchToCurrentThread NS_DispatchToCurrentThread_P
|
||||
# define NS_DispatchToMainThread NS_DispatchToMainThread_P
|
||||
# define NS_ProcessPendingEvents NS_ProcessPendingEvents_P
|
||||
# define NS_HasPendingEvents NS_HasPendingEvents_P
|
||||
# define NS_ProcessNextEvent NS_ProcessNextEvent_P
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// These methods are alternatives to the methods on nsIThreadManager, provided
|
||||
// for convenience.
|
||||
|
@ -8,6 +8,12 @@
|
||||
#ifndef xptcall_h___
|
||||
#define xptcall_h___
|
||||
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
# define NS_GetXPTCallStub NS_GetXPTCallStub_P
|
||||
# define NS_DestroyXPTCallStub NS_DestroyXPTCallStub_P
|
||||
# define NS_InvokeByIndex NS_InvokeByIndex_P
|
||||
#endif
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
#include "xpt_struct.h"
|
||||
|
@ -61,20 +61,20 @@ invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, nsXPTCVariant* s)
|
||||
|
||||
/*
|
||||
* EXPORT_XPCOM_API(nsresult)
|
||||
* NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
* NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
* uint32_t paramCount, nsXPTCVariant* params)
|
||||
*/
|
||||
__asm__(
|
||||
"#### NS_InvokeByIndex ####\n"
|
||||
"#### NS_InvokeByIndex_P ####\n"
|
||||
".text\n\t"
|
||||
".align 5\n\t"
|
||||
".globl NS_InvokeByIndex\n\t"
|
||||
".ent NS_InvokeByIndex\n"
|
||||
"NS_InvokeByIndex:\n\t"
|
||||
".globl NS_InvokeByIndex_P\n\t"
|
||||
".ent NS_InvokeByIndex_P\n"
|
||||
"NS_InvokeByIndex_P:\n\t"
|
||||
".frame $15,32,$26,0\n\t"
|
||||
".mask 0x4008000,-32\n\t"
|
||||
"ldgp $29,0($27)\n"
|
||||
"$NS_InvokeByIndex..ng:\n\t"
|
||||
"$NS_InvokeByIndex_P..ng:\n\t"
|
||||
"subq $30,32,$30\n\t"
|
||||
"stq $26,0($30)\n\t"
|
||||
"stq $15,8($30)\n\t"
|
||||
@ -140,5 +140,5 @@ __asm__(
|
||||
"ldq $15,8($30)\n\t"
|
||||
"addq $30,32,$30\n\t"
|
||||
"ret $31,($26),1\n\t"
|
||||
".end NS_InvokeByIndex"
|
||||
".end NS_InvokeByIndex_P"
|
||||
);
|
||||
|
@ -100,7 +100,7 @@ invoke_copy_to_stack(uint64_t * d, uint32_t paramCount, nsXPTCVariant * s,
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports * that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports * that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant * params)
|
||||
{
|
||||
uint32_t nr_gpr, nr_fpr, nr_stack;
|
||||
|
@ -7,8 +7,8 @@
|
||||
.psr msb
|
||||
// Section has executable code
|
||||
.section .text, "ax","progbits"
|
||||
// procedure named 'NS_InvokeByIndex'
|
||||
.proc NS_InvokeByIndex
|
||||
// procedure named 'NS_InvokeByIndex_P'
|
||||
.proc NS_InvokeByIndex_P
|
||||
// manual bundling
|
||||
.explicit
|
||||
|
||||
@ -19,12 +19,12 @@
|
||||
// .exclass invoke_copy_to_stack, @fullyvisible
|
||||
.type invoke_copy_to_stack,@function
|
||||
|
||||
// .exclass NS_InvokeByIndex, @fullyvisible
|
||||
.type NS_InvokeByIndex,@function
|
||||
// .exclass NS_InvokeByIndex_P, @fullyvisible
|
||||
.type NS_InvokeByIndex_P,@function
|
||||
|
||||
// NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
// NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
// uint32_t paramCount, nsXPTCVariant* params);
|
||||
NS_InvokeByIndex::
|
||||
NS_InvokeByIndex_P::
|
||||
.prologue
|
||||
.save ar.pfs, r37
|
||||
// allocate 4 input args, 6 local args, and 8 output args
|
||||
|
@ -7,8 +7,8 @@
|
||||
.psr lsb
|
||||
// Section has executable code
|
||||
.section .text, "ax","progbits"
|
||||
// procedure named 'NS_InvokeByIndex'
|
||||
.proc NS_InvokeByIndex
|
||||
// procedure named 'NS_InvokeByIndex_P'
|
||||
.proc NS_InvokeByIndex_P
|
||||
// manual bundling
|
||||
.explicit
|
||||
|
||||
@ -19,12 +19,12 @@
|
||||
// .exclass invoke_copy_to_stack, @fullyvisible
|
||||
.type invoke_copy_to_stack,@function
|
||||
|
||||
// .exclass NS_InvokeByIndex, @fullyvisible
|
||||
.type NS_InvokeByIndex,@function
|
||||
// .exclass NS_InvokeByIndex_P, @fullyvisible
|
||||
.type NS_InvokeByIndex_P,@function
|
||||
|
||||
// XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
// uint32_t paramCount, nsXPTCVariant* params);
|
||||
NS_InvokeByIndex::
|
||||
NS_InvokeByIndex_P::
|
||||
.prologue
|
||||
.save ar.pfs, r37
|
||||
// allocate 4 input args, 6 local args, and 8 output args
|
||||
|
@ -38,15 +38,15 @@
|
||||
.text
|
||||
|
||||
#
|
||||
# _NS_InvokeByIndex(that, methodIndex, paramCount, params)
|
||||
# _NS_InvokeByIndex_P(that, methodIndex, paramCount, params)
|
||||
# a0 a1 a2 a3
|
||||
|
||||
.globl _NS_InvokeByIndex
|
||||
.globl _NS_InvokeByIndex_P
|
||||
.align 2
|
||||
.type _NS_InvokeByIndex,@function
|
||||
.ent _NS_InvokeByIndex,0
|
||||
.type _NS_InvokeByIndex_P,@function
|
||||
.ent _NS_InvokeByIndex_P,0
|
||||
.frame fp, FRAMESZ, ra
|
||||
_NS_InvokeByIndex:
|
||||
_NS_InvokeByIndex_P:
|
||||
SETUP_GP
|
||||
subu sp, FRAMESZ
|
||||
|
||||
@ -131,4 +131,4 @@ _NS_InvokeByIndex:
|
||||
|
||||
addiu sp, FRAMESZ
|
||||
j ra
|
||||
END(_NS_InvokeByIndex)
|
||||
END(_NS_InvokeByIndex_P)
|
||||
|
@ -21,12 +21,12 @@ S0OFF=FRAMESZ-(6*SZREG)
|
||||
GPOFF=FRAMESZ-(7*SZREG)
|
||||
|
||||
#
|
||||
# _NS_InvokeByIndex(that, methodIndex, paramCount, params)
|
||||
# _NS_InvokeByIndex_P(that, methodIndex, paramCount, params)
|
||||
# a0 a1 a2 a3
|
||||
|
||||
NESTED(_NS_InvokeByIndex, FRAMESZ, ra)
|
||||
NESTED(_NS_InvokeByIndex_P, FRAMESZ, ra)
|
||||
PTR_SUBU sp, FRAMESZ
|
||||
SETUP_GP64(GPOFF, _NS_InvokeByIndex)
|
||||
SETUP_GP64(GPOFF, _NS_InvokeByIndex_P)
|
||||
|
||||
REG_S ra, RAOFF(sp)
|
||||
REG_S a0, A0OFF(sp)
|
||||
@ -119,4 +119,4 @@ NESTED(_NS_InvokeByIndex, FRAMESZ, ra)
|
||||
REG_L s0, S0OFF(sp)
|
||||
PTR_ADDU sp, FRAMESZ
|
||||
j ra
|
||||
.end _NS_InvokeByIndex
|
||||
.end _NS_InvokeByIndex_P
|
||||
|
@ -12,11 +12,11 @@
|
||||
framesz:
|
||||
.equ 128
|
||||
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, @function
|
||||
.globl NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, @function
|
||||
|
||||
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
.PROC
|
||||
.CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
|
||||
.ENTRY
|
||||
@ -104,5 +104,5 @@ NS_InvokeByIndex:
|
||||
NOP
|
||||
.EXIT
|
||||
.PROCEND ;in=23,24,25,26;
|
||||
.SIZE NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
.SIZE NS_InvokeByIndex_P, .-NS_InvokeByIndex_P
|
||||
|
||||
|
@ -19,21 +19,21 @@
|
||||
|
||||
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
# NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
# uint32_t paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.section ".toc","aw"
|
||||
.section ".text"
|
||||
.align 2
|
||||
.globl NS_InvokeByIndex
|
||||
.globl NS_InvokeByIndex_P
|
||||
.section ".opd","aw"
|
||||
.align 3
|
||||
NS_InvokeByIndex:
|
||||
.quad .NS_InvokeByIndex,.TOC.@tocbase
|
||||
NS_InvokeByIndex_P:
|
||||
.quad .NS_InvokeByIndex_P,.TOC.@tocbase
|
||||
.previous
|
||||
.type NS_InvokeByIndex,@function
|
||||
.NS_InvokeByIndex:
|
||||
.type NS_InvokeByIndex_P,@function
|
||||
.NS_InvokeByIndex_P:
|
||||
mflr 0
|
||||
std 0,16(r1)
|
||||
|
||||
@ -126,7 +126,7 @@ NS_InvokeByIndex:
|
||||
mtlr 0
|
||||
blr
|
||||
|
||||
.size NS_InvokeByIndex,.-.NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P,.-.NS_InvokeByIndex_P
|
||||
|
||||
# Magic indicating no need for an executable stack
|
||||
.section .note.GNU-stack, "", @progbits ; .previous
|
||||
|
@ -25,24 +25,24 @@
|
||||
|
||||
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.NS_InvokeByIndex{TC},"NS_InvokeByIndex"
|
||||
.rename H.18.NS_InvokeByIndex_P{TC},"NS_InvokeByIndex_P"
|
||||
|
||||
|
||||
# .text section
|
||||
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .NS_InvokeByIndex
|
||||
.globl NS_InvokeByIndex{DS}
|
||||
.globl .NS_InvokeByIndex_P
|
||||
.globl NS_InvokeByIndex_P{DS}
|
||||
.extern .invoke_copy_to_stack
|
||||
.extern ._ptrgl{PR}
|
||||
|
||||
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
# NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
# uint32_t paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.NS_InvokeByIndex:
|
||||
.NS_InvokeByIndex_P:
|
||||
mflr r0
|
||||
stw r31,-4(sp)
|
||||
#
|
||||
@ -117,13 +117,13 @@
|
||||
# .data section
|
||||
|
||||
.toc # 0x00000038
|
||||
T.18.NS_InvokeByIndex:
|
||||
.tc H.18.NS_InvokeByIndex{TC},NS_InvokeByIndex{DS}
|
||||
T.18.NS_InvokeByIndex_P:
|
||||
.tc H.18.NS_InvokeByIndex_P{TC},NS_InvokeByIndex_P{DS}
|
||||
|
||||
.csect NS_InvokeByIndex{DS}
|
||||
.long .NS_InvokeByIndex # "\0\0\0\0"
|
||||
.csect NS_InvokeByIndex_P{DS}
|
||||
.long .NS_InvokeByIndex_P # "\0\0\0\0"
|
||||
.long TOC{TC0} # "\0\0\0008"
|
||||
.long 0x00000000 # "\0\0\0\0"
|
||||
# End csect NS_InvokeByIndex{DS}
|
||||
# End csect NS_InvokeByIndex_P{DS}
|
||||
|
||||
# .bss section
|
||||
|
@ -20,23 +20,23 @@
|
||||
.set CR0_EQ,2
|
||||
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.NS_InvokeByIndex{TC},"NS_InvokeByIndex"
|
||||
.rename H.18.NS_InvokeByIndex_P{TC},"NS_InvokeByIndex_P"
|
||||
|
||||
|
||||
# .text section
|
||||
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .NS_InvokeByIndex
|
||||
.globl NS_InvokeByIndex{DS}
|
||||
.globl .NS_InvokeByIndex_P
|
||||
.globl NS_InvokeByIndex_P{DS}
|
||||
.extern .invoke_copy_to_stack
|
||||
.extern ._ptrgl{PR}
|
||||
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
# NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
# uint32_t paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.NS_InvokeByIndex:
|
||||
.NS_InvokeByIndex_P:
|
||||
mflr r0
|
||||
std r31,-8(sp)
|
||||
#
|
||||
@ -116,13 +116,13 @@
|
||||
# .data section
|
||||
|
||||
.toc # 0x00000038
|
||||
T.18.NS_InvokeByIndex:
|
||||
.tc H.18.NS_InvokeByIndex{TC},NS_InvokeByIndex{DS}
|
||||
T.18.NS_InvokeByIndex_P:
|
||||
.tc H.18.NS_InvokeByIndex_P{TC},NS_InvokeByIndex_P{DS}
|
||||
|
||||
.csect NS_InvokeByIndex{DS}
|
||||
.llong .NS_InvokeByIndex # "\0\0\0\0"
|
||||
.csect NS_InvokeByIndex_P{DS}
|
||||
.llong .NS_InvokeByIndex_P # "\0\0\0\0"
|
||||
.llong TOC{TC0} # "\0\0\0008"
|
||||
.llong 0x00000000 # "\0\0\0\0"
|
||||
# End csect NS_InvokeByIndex{DS}
|
||||
# End csect NS_InvokeByIndex_P{DS}
|
||||
|
||||
# .bss section
|
||||
|
@ -25,24 +25,24 @@
|
||||
|
||||
|
||||
.rename H.10.NO_SYMBOL{PR},""
|
||||
.rename H.18.NS_InvokeByIndex{TC},"NS_InvokeByIndex"
|
||||
.rename H.18.NS_InvokeByIndex_P{TC},"NS_InvokeByIndex_P"
|
||||
|
||||
|
||||
# .text section
|
||||
|
||||
.csect H.10.NO_SYMBOL{PR}
|
||||
.globl .NS_InvokeByIndex
|
||||
.globl NS_InvokeByIndex{DS}
|
||||
.globl .NS_InvokeByIndex_P
|
||||
.globl NS_InvokeByIndex_P{DS}
|
||||
.extern .invoke_copy_to_stack
|
||||
.extern ._ptrgl{PR}
|
||||
|
||||
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
# NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
# uint32_t paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.NS_InvokeByIndex:
|
||||
.NS_InvokeByIndex_P:
|
||||
mflr r0
|
||||
stw r31,-4(sp)
|
||||
#
|
||||
@ -112,13 +112,13 @@
|
||||
# .data section
|
||||
|
||||
.toc # 0x00000038
|
||||
T.18.NS_InvokeByIndex:
|
||||
.tc H.18.NS_InvokeByIndex{TC},NS_InvokeByIndex{DS}
|
||||
T.18.NS_InvokeByIndex_P:
|
||||
.tc H.18.NS_InvokeByIndex_P{TC},NS_InvokeByIndex_P{DS}
|
||||
|
||||
.csect NS_InvokeByIndex{DS}
|
||||
.long .NS_InvokeByIndex # "\0\0\0\0"
|
||||
.csect NS_InvokeByIndex_P{DS}
|
||||
.long .NS_InvokeByIndex_P # "\0\0\0\0"
|
||||
.long TOC{TC0} # "\0\0\0008"
|
||||
.long 0x00000000 # "\0\0\0\0"
|
||||
# End csect NS_InvokeByIndex{DS}
|
||||
# End csect NS_InvokeByIndex_P{DS}
|
||||
|
||||
# .bss section
|
||||
|
@ -21,15 +21,15 @@
|
||||
|
||||
.section ".text"
|
||||
.align 2
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex,@function
|
||||
.globl NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P,@function
|
||||
|
||||
//
|
||||
// NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
// NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
// uint32_t paramCount, nsXPTCVariant* params)
|
||||
//
|
||||
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
stwu sp,-32(sp) // setup standard stack frame
|
||||
mflr r0 // save LR
|
||||
stw r3,8(sp) // r3 <= that
|
||||
|
@ -21,15 +21,15 @@
|
||||
|
||||
.section ".text"
|
||||
.align 2
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex,@function
|
||||
.globl NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P,@function
|
||||
|
||||
//
|
||||
// NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
// NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
// uint32_t paramCount, nsXPTCVariant* params)
|
||||
//
|
||||
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
stwu sp,-32(sp) // setup standard stack frame
|
||||
mflr r0 // save LR
|
||||
stw r3,8(sp) // r3 <= that
|
||||
|
@ -14,12 +14,12 @@
|
||||
.text
|
||||
.align 2
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
# NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
# uint32_t paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.globl __NS_InvokeByIndex
|
||||
__NS_InvokeByIndex:
|
||||
.globl __NS_InvokeByIndex_P
|
||||
__NS_InvokeByIndex_P:
|
||||
mflr r0
|
||||
stw r31,-4(r1)
|
||||
#
|
||||
|
@ -14,15 +14,15 @@
|
||||
The SCD is available from http://www.sparc.com/.
|
||||
*/
|
||||
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, #function
|
||||
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(128 + 64),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 64
|
||||
sll %i2,4,%l0 ! assume the worst case
|
||||
@ -83,4 +83,4 @@ NS_InvokeByIndex:
|
||||
ret
|
||||
restore
|
||||
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, .-NS_InvokeByIndex
|
||||
|
@ -8,13 +8,13 @@
|
||||
* Platform specific code to invoke XPCOM methods on native objects for
|
||||
* Linux/Sparc with gcc 3 ABI.
|
||||
*/
|
||||
.global NS_InvokeByIndex
|
||||
.global NS_InvokeByIndex_P
|
||||
/*
|
||||
* NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
* uint32_t paramCount, nsXPTCVariant* params);
|
||||
*
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 16),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 16
|
||||
mov %i2,%o0 ! paramCount
|
||||
|
@ -8,12 +8,12 @@
|
||||
* Platform specific code to invoke XPCOM methods on native objects for
|
||||
* solaris/sparc with gcc 3 ABI.
|
||||
*/
|
||||
.global NS_InvokeByIndex
|
||||
.global NS_InvokeByIndex_P
|
||||
/*
|
||||
* NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
* NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
* uint32_t paramCount, nsXPTCVariant* params);
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
mov %i2,%o0 ! paramCount
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, #function
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
sll %i2,3,%l0 ! assume the worst case
|
||||
@ -53,4 +53,4 @@ NS_InvokeByIndex:
|
||||
ret
|
||||
restore
|
||||
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P
|
||||
|
@ -14,15 +14,15 @@
|
||||
The SCD is available from http://www.sparc.com/.
|
||||
*/
|
||||
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, #function
|
||||
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(128 + 64),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 64
|
||||
sll %i2,4,%l0 ! assume the worst case
|
||||
@ -82,4 +82,4 @@ NS_InvokeByIndex:
|
||||
ret
|
||||
restore
|
||||
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P
|
||||
|
@ -1,6 +1,6 @@
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, @function
|
||||
NS_InvokeByIndex:
|
||||
.globl NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, @function
|
||||
NS_InvokeByIndex_P:
|
||||
push %ebp
|
||||
movl %esp,%ebp
|
||||
push %ebx
|
||||
@ -51,5 +51,5 @@ NS_InvokeByIndex:
|
||||
movl %ebp,%esp
|
||||
pop %ebp
|
||||
ret
|
||||
.size NS_InvokeByIndex, . - NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, . - NS_InvokeByIndex_P
|
||||
|
||||
|
@ -33,7 +33,7 @@ invoke_copy_to_stack(uint32_t paramCount, nsXPTCVariant* s, uint32_t* d)
|
||||
|
||||
/*
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
Each param takes at most two 4-byte words.
|
||||
@ -52,11 +52,11 @@ __asm__ (
|
||||
/* alignment here seems unimportant here; this was 16, now it's 2 which
|
||||
is what xptcstubs uses. */
|
||||
".align 2\n\t"
|
||||
".globl " SYMBOL_UNDERSCORE "NS_InvokeByIndex\n\t"
|
||||
".globl " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P\n\t"
|
||||
#ifndef XP_MACOSX
|
||||
".type " SYMBOL_UNDERSCORE "NS_InvokeByIndex,@function\n"
|
||||
".type " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P,@function\n"
|
||||
#endif
|
||||
SYMBOL_UNDERSCORE "NS_InvokeByIndex:\n\t"
|
||||
SYMBOL_UNDERSCORE "NS_InvokeByIndex_P:\n\t"
|
||||
"pushl %ebp\n\t"
|
||||
"movl %esp, %ebp\n\t"
|
||||
"movl 0x10(%ebp), %eax\n\t"
|
||||
@ -92,6 +92,6 @@ __asm__ (
|
||||
"popl %ebp\n\t"
|
||||
"ret\n"
|
||||
#ifndef XP_MACOSX
|
||||
".size " SYMBOL_UNDERSCORE "NS_InvokeByIndex, . -" SYMBOL_UNDERSCORE "NS_InvokeByIndex\n\t"
|
||||
".size " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P, . -" SYMBOL_UNDERSCORE "NS_InvokeByIndex_P\n\t"
|
||||
#endif
|
||||
);
|
||||
|
@ -61,20 +61,20 @@ invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, nsXPTCVariant* s)
|
||||
|
||||
/*
|
||||
* EXPORT_XPCOM_API(nsresult)
|
||||
* NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
* NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
* uint32_t paramCount, nsXPTCVariant* params)
|
||||
*/
|
||||
__asm__(
|
||||
"#### NS_InvokeByIndex ####\n"
|
||||
"#### NS_InvokeByIndex_P ####\n"
|
||||
".text\n\t"
|
||||
".align 5\n\t"
|
||||
".globl NS_InvokeByIndex\n\t"
|
||||
".ent NS_InvokeByIndex\n"
|
||||
"NS_InvokeByIndex:\n\t"
|
||||
".globl NS_InvokeByIndex_P\n\t"
|
||||
".ent NS_InvokeByIndex_P\n"
|
||||
"NS_InvokeByIndex_P:\n\t"
|
||||
".frame $15,32,$26,0\n\t"
|
||||
".mask 0x4008000,-32\n\t"
|
||||
"ldgp $29,0($27)\n"
|
||||
"$NS_InvokeByIndex..ng:\n\t"
|
||||
"$NS_InvokeByIndex_P..ng:\n\t"
|
||||
"subq $30,32,$30\n\t"
|
||||
"stq $26,0($30)\n\t"
|
||||
"stq $15,8($30)\n\t"
|
||||
@ -140,5 +140,5 @@ __asm__(
|
||||
"ldq $15,8($30)\n\t"
|
||||
"addq $30,32,$30\n\t"
|
||||
"ret $31,($26),1\n\t"
|
||||
".end NS_InvokeByIndex"
|
||||
".end NS_InvokeByIndex_P"
|
||||
);
|
||||
|
@ -97,7 +97,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
uint32_t result, n;
|
||||
|
@ -87,13 +87,13 @@ invoke_copy_to_stack(uint32_t* d, uint32_t paramCount,
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount,
|
||||
nsXPTCVariant* params);
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return _NS_InvokeByIndex(that, methodIndex, paramCount, params);
|
||||
return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
|
||||
}
|
||||
|
@ -128,13 +128,13 @@ invoke_copy_to_stack(uint64_t* d, uint32_t paramCount,
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount,
|
||||
nsXPTCVariant* params);
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return _NS_InvokeByIndex(that, methodIndex, paramCount, params);
|
||||
return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
|
||||
}
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
// Platform specific code to invoke XPCOM methods on native objects
|
||||
|
||||
// The purpose of NS_InvokeByIndex() is to map a platform
|
||||
// The purpose of NS_InvokeByIndex_P() is to map a platform
|
||||
// independent call to the platform ABI. To do that,
|
||||
// NS_InvokeByIndex() has to determine the method to call via vtable
|
||||
// NS_InvokeByIndex_P() has to determine the method to call via vtable
|
||||
// access. The parameters for the method are read from the
|
||||
// nsXPTCVariant* and prepared for the native ABI.
|
||||
|
||||
@ -90,6 +90,6 @@ invoke_copy_to_stack(uint64_t* gpregs,
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
// Platform specific code to invoke XPCOM methods on native objects
|
||||
|
||||
// The purpose of NS_InvokeByIndex() is to map a platform
|
||||
// The purpose of NS_InvokeByIndex_P() is to map a platform
|
||||
// indepenpent call to the platform ABI. To do that,
|
||||
// NS_InvokeByIndex() has to determine the method to call via vtable
|
||||
// NS_InvokeByIndex_P() has to determine the method to call via vtable
|
||||
// access. The parameters for the method are read from the
|
||||
// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
|
||||
// ABI this means that the first 8 integral and floating point
|
||||
@ -120,5 +120,5 @@ invoke_copy_to_stack(uint32_t* d,
|
||||
|
||||
extern "C"
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
// Platform specific code to invoke XPCOM methods on native objects
|
||||
|
||||
// The purpose of NS_InvokeByIndex() is to map a platform
|
||||
// The purpose of NS_InvokeByIndex_P() is to map a platform
|
||||
// indepenpent call to the platform ABI. To do that,
|
||||
// NS_InvokeByIndex() has to determine the method to call via vtable
|
||||
// NS_InvokeByIndex_P() has to determine the method to call via vtable
|
||||
// access. The parameters for the method are read from the
|
||||
// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
|
||||
// ABI this means that the first 8 integral and floating point
|
||||
@ -102,5 +102,5 @@ invoke_copy_to_stack(uint32_t* d,
|
||||
|
||||
extern "C"
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
@ -101,13 +101,13 @@ invoke_copy_to_stack(uint32_t* d, uint32_t paramCount, nsXPTCVariant* s, double
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount,
|
||||
nsXPTCVariant* params);
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return _NS_InvokeByIndex(that, methodIndex, paramCount, params);
|
||||
return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ invoke_copy_to_stack(uint64_t * d, uint32_t paramCount, nsXPTCVariant * s,
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports * that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports * that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant * params)
|
||||
{
|
||||
uint32_t nr_gpr, nr_fpr, nr_stack;
|
||||
|
@ -102,7 +102,7 @@ invoke_copy_to_stack(uint64_t * d, uint32_t paramCount, nsXPTCVariant * s,
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports * that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports * that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant * params)
|
||||
{
|
||||
uint32_t nr_stack;
|
||||
|
@ -49,7 +49,7 @@ invoke_copy_to_stack(uint32_t* d, uint32_t paramCount, nsXPTCVariant* s)
|
||||
// a custom FPO program.
|
||||
#pragma optimize( "y", off )
|
||||
extern "C" NS_EXPORT nsresult NS_FROZENCALL
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
__asm {
|
||||
|
@ -51,7 +51,7 @@ XPTC__InvokebyIndex(nsISupports* that, uint32_t methodIndex,
|
||||
|
||||
extern "C"
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return XPTC__InvokebyIndex(that, methodIndex, paramCount, params);
|
||||
|
@ -45,7 +45,7 @@ invoke_copy_to_stack(uint32_t paramCount, nsXPTCVariant* s, uint32_t* d)
|
||||
|
||||
/*
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params);
|
||||
|
||||
Each param takes at most two 4-byte words.
|
||||
@ -64,8 +64,8 @@ __asm__ (
|
||||
/* alignment here seems unimportant here; this was 16, now it's 2 which
|
||||
is what xptcstubs uses. */
|
||||
".align 2\n\t"
|
||||
".globl _NS_InvokeByIndex\n\t"
|
||||
"_NS_InvokeByIndex:\n\t"
|
||||
".globl _NS_InvokeByIndex_P\n\t"
|
||||
"_NS_InvokeByIndex_P:\n\t"
|
||||
"pushl %ebp\n\t"
|
||||
"movl %esp, %ebp\n\t"
|
||||
"movl 0x10(%ebp), %eax\n\t"
|
||||
@ -101,6 +101,6 @@ __asm__ (
|
||||
"popl %ebp\n\t"
|
||||
"ret\n"
|
||||
".section .drectve\n\t"
|
||||
".ascii \" -export:NS_InvokeByIndex\"\n\t"
|
||||
".ascii \" -export:NS_InvokeByIndex_P\"\n\t"
|
||||
".text\n\t"
|
||||
);
|
||||
|
@ -18,6 +18,34 @@
|
||||
* dependency on the implementation details of the abstract string types.
|
||||
*/
|
||||
|
||||
// Map frozen functions to private symbol names if not using strict API.
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
# define NS_StringContainerInit NS_StringContainerInit_P
|
||||
# define NS_StringContainerInit2 NS_StringContainerInit2_P
|
||||
# define NS_StringContainerFinish NS_StringContainerFinish_P
|
||||
# define NS_StringGetData NS_StringGetData_P
|
||||
# define NS_StringGetMutableData NS_StringGetMutableData_P
|
||||
# define NS_StringCloneData NS_StringCloneData_P
|
||||
# define NS_StringSetData NS_StringSetData_P
|
||||
# define NS_StringSetDataRange NS_StringSetDataRange_P
|
||||
# define NS_StringCopy NS_StringCopy_P
|
||||
# define NS_StringSetIsVoid NS_StringSetIsVoid_P
|
||||
# define NS_StringGetIsVoid NS_StringGetIsVoid_P
|
||||
# define NS_CStringContainerInit NS_CStringContainerInit_P
|
||||
# define NS_CStringContainerInit2 NS_CStringContainerInit2_P
|
||||
# define NS_CStringContainerFinish NS_CStringContainerFinish_P
|
||||
# define NS_CStringGetData NS_CStringGetData_P
|
||||
# define NS_CStringGetMutableData NS_CStringGetMutableData_P
|
||||
# define NS_CStringCloneData NS_CStringCloneData_P
|
||||
# define NS_CStringSetData NS_CStringSetData_P
|
||||
# define NS_CStringSetDataRange NS_CStringSetDataRange_P
|
||||
# define NS_CStringCopy NS_CStringCopy_P
|
||||
# define NS_CStringSetIsVoid NS_CStringSetIsVoid_P
|
||||
# define NS_CStringGetIsVoid NS_CStringGetIsVoid_P
|
||||
# define NS_CStringToUTF16 NS_CStringToUTF16_P
|
||||
# define NS_UTF16ToCString NS_UTF16ToCString_P
|
||||
#endif
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
/* The base string types */
|
||||
|
59
xpcom/stub/Makefile.in
Normal file
59
xpcom/stub/Makefile.in
Normal file
@ -0,0 +1,59 @@
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
# 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/.
|
||||
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
LIBRARY_NAME = xpcom
|
||||
|
||||
# The XPCOM glue uses realpath() on libxpcom.so to resolve any symlinks. We
|
||||
# want it to find dist/bin and not xpcom/stub so we copy instead of symlinking.
|
||||
NSDISTMODE = copy
|
||||
|
||||
# Do not set EXPORT_LIBRARY as we do not want xpcom in the static libs list
|
||||
#EXPORT_LIBRARY = 1
|
||||
GRE_MODULE = 1
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
|
||||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../build
|
||||
|
||||
CPPSRCS = nsXPComStub.cpp
|
||||
|
||||
# If we have an import library, then copy that to the SDK. Otherwise,
|
||||
# copy the shared library.
|
||||
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
||||
SDK_LIBRARY = $(IMPORT_LIBRARY)
|
||||
else
|
||||
SDK_LIBRARY = $(SHARED_LIBRARY)
|
||||
endif
|
||||
|
||||
|
||||
FORCE_SHARED_LIB = 1
|
||||
|
||||
EXTRA_DSO_LDOPTS = $(LIBS_DIR)
|
||||
|
||||
ifeq (bundle,$(MOZ_FS_LAYOUT))
|
||||
EXTRA_DSO_LDOPTS += $(DIST)/bin/XUL
|
||||
else
|
||||
EXTRA_DSO_LIBS = xul
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(MOZALLOC_LIB) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
libs:: $(FINAL_TARGET)/dependentlibs.list
|
||||
|
||||
$(FINAL_TARGET)/dependentlibs.list: dependentlibs.py $(SHARED_LIBRARY) $(wildcard $(if $(wildcard $(FINAL_TARGET)/dependentlibs.list),$(addprefix $(FINAL_TARGET)/,$(shell cat $(FINAL_TARGET)/dependentlibs.list))))
|
||||
$(PYTHON) $< $(SHARED_LIBRARY) -L $(FINAL_TARGET) $(if $(TOOLCHAIN_PREFIX),$(addprefix -p ,$(TOOLCHAIN_PREFIX))) > $@
|
@ -3,7 +3,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
'''Given a library, dependentlibs.py prints the list of libraries it depends
|
||||
upon that are in the same directory, followed by the library itself.
|
||||
upon that are in the same directory.
|
||||
'''
|
||||
|
||||
from optparse import OptionParser
|
||||
@ -92,7 +92,7 @@ def dependentlibs_otool(lib):
|
||||
|
||||
def dependentlibs(lib, libpaths, func):
|
||||
'''For a given library, returns the list of recursive dependencies that can
|
||||
be found in the given list of paths, followed by the library itself.'''
|
||||
be found in the given list of paths'''
|
||||
assert(libpaths)
|
||||
assert(isinstance(libpaths, list))
|
||||
deps = []
|
||||
@ -129,7 +129,7 @@ def main():
|
||||
if not options.libpaths:
|
||||
options.libpaths = [os.path.dirname(lib)]
|
||||
|
||||
print '\n'.join(dependentlibs(lib, options.libpaths, func) + [lib])
|
||||
print '\n'.join(dependentlibs(lib, options.libpaths, func))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
7
xpcom/stub/moz.build
Normal file
7
xpcom/stub/moz.build
Normal file
@ -0,0 +1,7 @@
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
MODULE = 'xpcom'
|
||||
|
514
xpcom/stub/nsXPComStub.cpp
Normal file
514
xpcom/stub/nsXPComStub.cpp
Normal file
@ -0,0 +1,514 @@
|
||||
/* 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 "nsXPCOM.h"
|
||||
#include "nsXPCOMPrivate.h"
|
||||
#include "nsXPCOMStrings.h"
|
||||
#include "xptcall.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Private Method to register an exit routine. This method
|
||||
* used to allow you to setup a callback that will be called from
|
||||
* the NS_ShutdownXPCOM function after all services and
|
||||
* components have gone away. It was fatally flawed in that the component
|
||||
* DLL could be released before the exit function was called; it is now a
|
||||
* stub implementation that does nothing.
|
||||
*/
|
||||
XPCOM_API(nsresult)
|
||||
NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, uint32_t priority);
|
||||
|
||||
XPCOM_API(nsresult)
|
||||
NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine);
|
||||
|
||||
static const XPCOMFunctions kFrozenFunctions = {
|
||||
XPCOM_GLUE_VERSION,
|
||||
sizeof(XPCOMFunctions),
|
||||
&NS_InitXPCOM2_P,
|
||||
&NS_ShutdownXPCOM_P,
|
||||
&NS_GetServiceManager_P,
|
||||
&NS_GetComponentManager_P,
|
||||
&NS_GetComponentRegistrar_P,
|
||||
&NS_GetMemoryManager_P,
|
||||
&NS_NewLocalFile_P,
|
||||
&NS_NewNativeLocalFile_P,
|
||||
&NS_RegisterXPCOMExitRoutine,
|
||||
&NS_UnregisterXPCOMExitRoutine,
|
||||
|
||||
// these functions were added post 1.4
|
||||
&NS_GetDebug_P,
|
||||
&NS_GetTraceRefcnt_P,
|
||||
|
||||
// these functions were added post 1.6
|
||||
&NS_StringContainerInit_P,
|
||||
&NS_StringContainerFinish_P,
|
||||
&NS_StringGetData_P,
|
||||
&NS_StringSetData_P,
|
||||
&NS_StringSetDataRange_P,
|
||||
&NS_StringCopy_P,
|
||||
&NS_CStringContainerInit_P,
|
||||
&NS_CStringContainerFinish_P,
|
||||
&NS_CStringGetData_P,
|
||||
&NS_CStringSetData_P,
|
||||
&NS_CStringSetDataRange_P,
|
||||
&NS_CStringCopy_P,
|
||||
&NS_CStringToUTF16_P,
|
||||
&NS_UTF16ToCString_P,
|
||||
&NS_StringCloneData_P,
|
||||
&NS_CStringCloneData_P,
|
||||
|
||||
// these functions were added post 1.7 (post Firefox 1.0)
|
||||
&NS_Alloc_P,
|
||||
&NS_Realloc_P,
|
||||
&NS_Free_P,
|
||||
&NS_StringContainerInit2_P,
|
||||
&NS_CStringContainerInit2_P,
|
||||
&NS_StringGetMutableData_P,
|
||||
&NS_CStringGetMutableData_P,
|
||||
NULL,
|
||||
|
||||
// these functions were added post 1.8
|
||||
&NS_DebugBreak_P,
|
||||
&NS_LogInit_P,
|
||||
&NS_LogTerm_P,
|
||||
&NS_LogAddRef_P,
|
||||
&NS_LogRelease_P,
|
||||
&NS_LogCtor_P,
|
||||
&NS_LogDtor_P,
|
||||
&NS_LogCOMPtrAddRef_P,
|
||||
&NS_LogCOMPtrRelease_P,
|
||||
&NS_GetXPTCallStub_P,
|
||||
&NS_DestroyXPTCallStub_P,
|
||||
&NS_InvokeByIndex_P,
|
||||
nullptr,
|
||||
nullptr,
|
||||
&NS_StringSetIsVoid_P,
|
||||
&NS_StringGetIsVoid_P,
|
||||
&NS_CStringSetIsVoid_P,
|
||||
&NS_CStringGetIsVoid_P,
|
||||
|
||||
// these functions were added post 1.9
|
||||
&NS_CycleCollectorSuspect2_P,
|
||||
&NS_CycleCollectorForget2_P
|
||||
};
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetFrozenFunctions(XPCOMFunctions *functions, const char* /* libraryPath */)
|
||||
{
|
||||
if (!functions)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (functions->version != XPCOM_GLUE_VERSION)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
uint32_t size = functions->size;
|
||||
if (size > sizeof(XPCOMFunctions))
|
||||
size = sizeof(XPCOMFunctions);
|
||||
|
||||
size -= offsetof(XPCOMFunctions, init);
|
||||
|
||||
memcpy(&functions->init, &kFrozenFunctions.init, size);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs for nsXPCOM.h
|
||||
*/
|
||||
|
||||
#undef NS_InitXPCOM2
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InitXPCOM2(nsIServiceManager **result,
|
||||
nsIFile *binDirectory,
|
||||
nsIDirectoryServiceProvider *dirProvider)
|
||||
{
|
||||
return NS_InitXPCOM2_P(result, binDirectory, dirProvider);
|
||||
}
|
||||
|
||||
#undef NS_ShutdownXPCOM
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_ShutdownXPCOM(nsIServiceManager *svcMgr)
|
||||
{
|
||||
return NS_ShutdownXPCOM_P(svcMgr);
|
||||
}
|
||||
|
||||
#undef NS_GetServiceManager
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetServiceManager(nsIServiceManager* *result)
|
||||
{
|
||||
return NS_GetServiceManager_P(result);
|
||||
}
|
||||
|
||||
#undef NS_GetComponentManager
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetComponentManager(nsIComponentManager* *result)
|
||||
{
|
||||
return NS_GetComponentManager_P(result);
|
||||
}
|
||||
|
||||
#undef NS_GetComponentRegistrar
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetComponentRegistrar(nsIComponentRegistrar** result)
|
||||
{
|
||||
return NS_GetComponentRegistrar_P(result);
|
||||
}
|
||||
|
||||
#undef NS_GetMemoryManager
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetMemoryManager(nsIMemory* *result)
|
||||
{
|
||||
return NS_GetMemoryManager_P(result);
|
||||
}
|
||||
|
||||
#undef NS_NewLocalFile
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_NewLocalFile(const nsAString &path,
|
||||
bool followLinks,
|
||||
nsIFile **result)
|
||||
{
|
||||
return NS_NewLocalFile_P(path, followLinks, result);
|
||||
}
|
||||
|
||||
#undef NS_NewNativeLocalFile
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_NewNativeLocalFile(const nsACString &path,
|
||||
bool followLinks,
|
||||
nsIFile **result)
|
||||
{
|
||||
return NS_NewNativeLocalFile_P(path, followLinks, result);
|
||||
}
|
||||
|
||||
#undef NS_GetDebug
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetDebug(nsIDebug **result)
|
||||
{
|
||||
return NS_GetDebug_P(result);
|
||||
}
|
||||
|
||||
#undef NS_GetTraceRefcnt
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetTraceRefcnt(nsITraceRefcnt **result)
|
||||
{
|
||||
return NS_GetTraceRefcnt_P(result);
|
||||
}
|
||||
|
||||
#undef NS_Alloc
|
||||
EXPORT_XPCOM_API(void*)
|
||||
NS_Alloc(size_t size)
|
||||
{
|
||||
return NS_Alloc_P(size);
|
||||
}
|
||||
|
||||
#undef NS_Realloc
|
||||
EXPORT_XPCOM_API(void*)
|
||||
NS_Realloc(void* ptr, size_t size)
|
||||
{
|
||||
return NS_Realloc_P(ptr, size);
|
||||
}
|
||||
|
||||
#undef NS_Free
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_Free(void* ptr)
|
||||
{
|
||||
NS_Free_P(ptr);
|
||||
}
|
||||
|
||||
#undef NS_DebugBreak
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_DebugBreak(uint32_t aSeverity, const char *aStr, const char *aExpr,
|
||||
const char *aFile, int32_t aLine)
|
||||
{
|
||||
NS_DebugBreak_P(aSeverity, aStr, aExpr, aFile, aLine);
|
||||
}
|
||||
|
||||
#undef NS_LogInit
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogInit()
|
||||
{
|
||||
NS_LogInit_P();
|
||||
}
|
||||
|
||||
#undef NS_LogTerm
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogTerm()
|
||||
{
|
||||
NS_LogTerm_P();
|
||||
}
|
||||
|
||||
#undef NS_LogAddRef
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogAddRef(void* aPtr, nsrefcnt aNewRefCnt,
|
||||
const char *aTypeName, uint32_t aInstanceSize)
|
||||
{
|
||||
NS_LogAddRef_P(aPtr, aNewRefCnt, aTypeName, aInstanceSize);
|
||||
}
|
||||
|
||||
#undef NS_LogRelease
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogRelease(void* aPtr, nsrefcnt aNewRefCnt, const char *aTypeName)
|
||||
{
|
||||
NS_LogRelease_P(aPtr, aNewRefCnt, aTypeName);
|
||||
}
|
||||
|
||||
#undef NS_LogCtor
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogCtor(void *aPtr, const char *aTypeName, uint32_t aInstanceSize)
|
||||
{
|
||||
NS_LogCtor_P(aPtr, aTypeName, aInstanceSize);
|
||||
}
|
||||
|
||||
#undef NS_LogDtor
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogDtor(void *aPtr, const char *aTypeName, uint32_t aInstanceSize)
|
||||
{
|
||||
NS_LogDtor_P(aPtr, aTypeName, aInstanceSize);
|
||||
}
|
||||
|
||||
#undef NS_LogCOMPtrAddRef
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogCOMPtrAddRef(void *aCOMPtr, nsISupports* aObject)
|
||||
{
|
||||
NS_LogCOMPtrAddRef_P(aCOMPtr, aObject);
|
||||
}
|
||||
|
||||
#undef NS_LogCOMPtrRelease
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_LogCOMPtrRelease(void *aCOMPtr, nsISupports* aObject)
|
||||
{
|
||||
NS_LogCOMPtrRelease_P(aCOMPtr, aObject);
|
||||
}
|
||||
|
||||
#undef NS_GetXPTCallStub
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_GetXPTCallStub(REFNSIID aIID, nsIXPTCProxy* aOuter,
|
||||
nsISomeInterface* *aStub)
|
||||
{
|
||||
return NS_GetXPTCallStub_P(aIID, aOuter, aStub);
|
||||
}
|
||||
|
||||
#undef NS_DestroyXPTCallStub
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_DestroyXPTCallStub(nsISomeInterface* aStub)
|
||||
{
|
||||
NS_DestroyXPTCallStub_P(aStub);
|
||||
}
|
||||
|
||||
#undef NS_InvokeByIndex
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||
uint32_t paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs for nsXPCOMPrivate.h
|
||||
*/
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, uint32_t priority)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs for nsStringAPI.h
|
||||
*/
|
||||
|
||||
#undef NS_StringContainerInit
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_StringContainerInit(nsStringContainer &aStr)
|
||||
{
|
||||
return NS_StringContainerInit_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_StringContainerInit2
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_StringContainerInit2(nsStringContainer &aStr,
|
||||
const PRUnichar *aData,
|
||||
uint32_t aDataLength,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
return NS_StringContainerInit2_P(aStr, aData, aDataLength, aFlags);
|
||||
}
|
||||
|
||||
#undef NS_StringContainerFinish
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_StringContainerFinish(nsStringContainer &aStr)
|
||||
{
|
||||
NS_StringContainerFinish_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_StringGetData
|
||||
EXPORT_XPCOM_API(uint32_t)
|
||||
NS_StringGetData(const nsAString &aStr, const PRUnichar **aBuf, bool *aTerm)
|
||||
{
|
||||
return NS_StringGetData_P(aStr, aBuf, aTerm);
|
||||
}
|
||||
|
||||
#undef NS_StringGetMutableData
|
||||
EXPORT_XPCOM_API(uint32_t)
|
||||
NS_StringGetMutableData(nsAString &aStr, uint32_t aLen, PRUnichar **aBuf)
|
||||
{
|
||||
return NS_StringGetMutableData_P(aStr, aLen, aBuf);
|
||||
}
|
||||
|
||||
#undef NS_StringCloneData
|
||||
EXPORT_XPCOM_API(PRUnichar *)
|
||||
NS_StringCloneData(const nsAString &aStr)
|
||||
{
|
||||
return NS_StringCloneData_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_StringSetData
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_StringSetData(nsAString &aStr, const PRUnichar *aBuf, uint32_t aCount)
|
||||
{
|
||||
return NS_StringSetData_P(aStr, aBuf, aCount);
|
||||
}
|
||||
|
||||
#undef NS_StringSetDataRange
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_StringSetDataRange(nsAString &aStr, uint32_t aCutStart, uint32_t aCutLength,
|
||||
const PRUnichar *aBuf, uint32_t aCount)
|
||||
{
|
||||
return NS_StringSetDataRange_P(aStr, aCutStart, aCutLength, aBuf, aCount);
|
||||
}
|
||||
|
||||
#undef NS_StringCopy
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_StringCopy(nsAString &aDest, const nsAString &aSrc)
|
||||
{
|
||||
return NS_StringCopy_P(aDest, aSrc);
|
||||
}
|
||||
|
||||
#undef NS_StringSetIsVoid
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_StringSetIsVoid(nsAString &aStr, const bool aIsVoid)
|
||||
{
|
||||
NS_StringSetIsVoid_P(aStr, aIsVoid);
|
||||
}
|
||||
|
||||
#undef NS_StringGetIsVoid
|
||||
EXPORT_XPCOM_API(bool)
|
||||
NS_StringGetIsVoid(const nsAString &aStr)
|
||||
{
|
||||
return NS_StringGetIsVoid_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_CStringContainerInit
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_CStringContainerInit(nsCStringContainer &aStr)
|
||||
{
|
||||
return NS_CStringContainerInit_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_CStringContainerInit2
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_CStringContainerInit2(nsCStringContainer &aStr,
|
||||
const char *aData,
|
||||
uint32_t aDataLength,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
return NS_CStringContainerInit2_P(aStr, aData, aDataLength, aFlags);
|
||||
}
|
||||
|
||||
#undef NS_CStringContainerFinish
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_CStringContainerFinish(nsCStringContainer &aStr)
|
||||
{
|
||||
NS_CStringContainerFinish_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_CStringGetData
|
||||
EXPORT_XPCOM_API(uint32_t)
|
||||
NS_CStringGetData(const nsACString &aStr, const char **aBuf, bool *aTerm)
|
||||
{
|
||||
return NS_CStringGetData_P(aStr, aBuf, aTerm);
|
||||
}
|
||||
|
||||
#undef NS_CStringGetMutableData
|
||||
EXPORT_XPCOM_API(uint32_t)
|
||||
NS_CStringGetMutableData(nsACString &aStr, uint32_t aLen, char **aBuf)
|
||||
{
|
||||
return NS_CStringGetMutableData_P(aStr, aLen, aBuf);
|
||||
}
|
||||
|
||||
#undef NS_CStringCloneData
|
||||
EXPORT_XPCOM_API(char *)
|
||||
NS_CStringCloneData(const nsACString &aStr)
|
||||
{
|
||||
return NS_CStringCloneData_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_CStringSetData
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_CStringSetData(nsACString &aStr, const char *aBuf, uint32_t aCount)
|
||||
{
|
||||
return NS_CStringSetData_P(aStr, aBuf, aCount);
|
||||
}
|
||||
|
||||
#undef NS_CStringSetDataRange
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_CStringSetDataRange(nsACString &aStr, uint32_t aCutStart, uint32_t aCutLength,
|
||||
const char *aBuf, uint32_t aCount)
|
||||
{
|
||||
return NS_CStringSetDataRange_P(aStr, aCutStart, aCutLength, aBuf, aCount);
|
||||
}
|
||||
|
||||
#undef NS_CStringCopy
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_CStringCopy(nsACString &aDest, const nsACString &aSrc)
|
||||
{
|
||||
return NS_CStringCopy_P(aDest, aSrc);
|
||||
}
|
||||
|
||||
#undef NS_CStringSetIsVoid
|
||||
EXPORT_XPCOM_API(void)
|
||||
NS_CStringSetIsVoid(nsACString &aStr, const bool aIsVoid)
|
||||
{
|
||||
NS_CStringSetIsVoid_P(aStr, aIsVoid);
|
||||
}
|
||||
|
||||
#undef NS_CStringGetIsVoid
|
||||
EXPORT_XPCOM_API(bool)
|
||||
NS_CStringGetIsVoid(const nsACString &aStr)
|
||||
{
|
||||
return NS_CStringGetIsVoid_P(aStr);
|
||||
}
|
||||
|
||||
#undef NS_CStringToUTF16
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_CStringToUTF16(const nsACString &aSrc, nsCStringEncoding aSrcEncoding, nsAString &aDest)
|
||||
{
|
||||
return NS_CStringToUTF16_P(aSrc, aSrcEncoding, aDest);
|
||||
}
|
||||
|
||||
#undef NS_UTF16ToCString
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_UTF16ToCString(const nsAString &aSrc, nsCStringEncoding aDestEncoding, nsACString &aDest)
|
||||
{
|
||||
return NS_UTF16ToCString_P(aSrc, aDestEncoding, aDest);
|
||||
}
|
||||
|
||||
#undef NS_CycleCollectorSuspect2
|
||||
EXPORT_XPCOM_API(nsPurpleBufferEntry*)
|
||||
NS_CycleCollectorSuspect2(void *obj, nsCycleCollectionParticipant *p)
|
||||
{
|
||||
return NS_CycleCollectorSuspect2_P(obj, p);
|
||||
}
|
||||
|
||||
#undef NS_CycleCollectorForget2
|
||||
EXPORT_XPCOM_API(bool)
|
||||
NS_CycleCollectorForget2(nsPurpleBufferEntry* e)
|
||||
{
|
||||
return NS_CycleCollectorForget2_P(e);
|
||||
}
|
Loading…
Reference in New Issue
Block a user