mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Adding a build configuration option that will allows us to no build the
xpcom obsolete library. r/a=benjamin. b=303429
This commit is contained in:
parent
9ecbd670ca
commit
e999241a5e
@ -140,10 +140,12 @@ endif
|
||||
tier_2_dirs = \
|
||||
js \
|
||||
xpcom \
|
||||
modules/libreg \
|
||||
xpcom/obsolete \
|
||||
$(NULL)
|
||||
|
||||
ifndef MOZ_NO_XPCOM_OBSOLETE
|
||||
tier_2_dirs += modules/libreg xpcom/obsolete
|
||||
endif
|
||||
|
||||
ifdef NS_TRACE_MALLOC
|
||||
tier_2_dirs += tools/trace-malloc/lib
|
||||
endif
|
||||
|
@ -131,6 +131,7 @@ MOZ_IPCD = @MOZ_IPCD@
|
||||
MOZ_PROFILESHARING = @MOZ_PROFILESHARING@
|
||||
MOZ_PROFILELOCKING = @MOZ_PROFILELOCKING@
|
||||
MOZ_STORAGE = @MOZ_STORAGE@
|
||||
MOZ_NO_XPCOM_OBSOLETE = @MOZ_NO_XPCOM_OBSOLETE@
|
||||
|
||||
MOZ_ENABLE_JAVAXPCOM = @MOZ_ENABLE_JAVAXPCOM@
|
||||
JAVA_INCLUDE_PATH=@JAVA_INCLUDE_PATH@
|
||||
|
22
configure.in
22
configure.in
@ -3937,6 +3937,7 @@ MOZ_LIBART_LIBS=
|
||||
MOZ_MAIL_NEWS=
|
||||
MOZ_MATHML=1
|
||||
MOZ_NO_ACTIVEX_SUPPORT=1
|
||||
MOZ_NO_XPCOM_OBSOLETE=
|
||||
MOZ_OJI=1
|
||||
MOZ_PLAINTEXT_EDITOR_ONLY=
|
||||
MOZ_PLUGINS=1
|
||||
@ -4028,6 +4029,7 @@ minimo)
|
||||
MOZ_MAIL_NEWS=
|
||||
MOZ_MATHML=
|
||||
MOZ_NO_ACTIVEX_SUPPORT=1
|
||||
MOZ_NO_XPCOM_OBSOLETE=1
|
||||
MOZ_OJI=
|
||||
MOZ_PLAINTEXT_EDITOR_ONLY=1
|
||||
MOZ_PROFILELOCKING=
|
||||
@ -4655,6 +4657,25 @@ MOZ_ARG_DISABLE_BOOL(composer,
|
||||
MOZ_COMPOSER=1 )
|
||||
AC_SUBST(MOZ_COMPOSER)
|
||||
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Drop XPCOM Obsolete library
|
||||
dnl ========================================================
|
||||
MOZ_ARG_DISABLE_BOOL(xpcom-obsolete,
|
||||
[ --disable-xpcom-obsolete Disable XPCOM Obsolete Library],
|
||||
MOZ_NO_XPCOM_OBSOLETE=,
|
||||
MOZ_NO_XPCOM_OBSOLETE=1)
|
||||
|
||||
if test -n "$MOZ_NO_XPCOM_OBSOLETE"; then
|
||||
if test -n "$MOZ_XPINSTALL"; then
|
||||
AC_MSG_ERROR([Building without xpcom-obsolete isn't support when building xpinstal.])
|
||||
fi
|
||||
if test -z "$MOZ_SINGLE_PROFILE"; then
|
||||
AC_MSG_ERROR([Building without xpcom-obsolete isn't support when building full profile support.])
|
||||
fi
|
||||
AC_DEFINE(MOZ_NO_XPCOM_OBSOLETE)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl XTF
|
||||
dnl ========================================================
|
||||
@ -6630,6 +6651,7 @@ AC_SUBST(MOZ_EXTENSIONS)
|
||||
AC_SUBST(MOZ_IMG_DECODERS)
|
||||
AC_SUBST(MOZ_JSDEBUGGER)
|
||||
AC_SUBST(MOZ_OJI)
|
||||
AC_SUBST(MOZ_NO_XPCOM_OBSOLETE)
|
||||
AC_SUBST(MOZ_PLUGINS)
|
||||
AC_SUBST(ENABLE_EAZEL_PROFILER)
|
||||
AC_SUBST(EAZEL_PROFILER_CFLAGS)
|
||||
|
@ -43,7 +43,11 @@
|
||||
#include "nsMemory.h"
|
||||
#include "prefapi.h"
|
||||
|
||||
#ifndef MOZ_NO_XPCOM_OBSOLETE
|
||||
#include "nsIFileSpec.h"
|
||||
#endif
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefLocalizedString.h"
|
||||
@ -477,16 +481,23 @@ NS_IMETHODIMP nsPref::GetDefaultLocalizedUnicharPref(const char *pref, PRUnichar
|
||||
|
||||
NS_IMETHODIMP nsPref::GetFilePref(const char *pref, nsIFileSpec **_retval)
|
||||
{
|
||||
#ifdef MOZ_NO_XPCOM_OBSOLETE
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsIFileSpec), (void **)_retval);
|
||||
return rv;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPref::SetFilePref(const char *pref, nsIFileSpec *value, PRBool setDefault)
|
||||
{
|
||||
#ifdef MOZ_NO_XPCOM_OBSOLETE
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
nsresult rv;
|
||||
|
||||
if (setDefault) {
|
||||
@ -497,6 +508,7 @@ NS_IMETHODIMP nsPref::SetFilePref(const char *pref, nsIFileSpec *value, PRBool s
|
||||
rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsIFileSpec), value);
|
||||
}
|
||||
return rv;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPref::GetFileXPref(const char *pref, nsILocalFile **_retval)
|
||||
|
@ -52,7 +52,13 @@
|
||||
#include "pldhash.h"
|
||||
#include "nsPrefsCID.h"
|
||||
|
||||
#ifndef MOZ_NO_XPCOM_OBSOLETE
|
||||
#include "nsIFileSpec.h" // this should be removed eventually
|
||||
#endif
|
||||
|
||||
#include "plstr.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#include "prefapi_private_data.h"
|
||||
|
||||
// Definitions
|
||||
@ -347,6 +353,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
||||
}
|
||||
|
||||
// This is deprecated and you should not be using it
|
||||
#ifndef MOZ_NO_XPCOM_OBSOLETE
|
||||
if (aType.Equals(NS_GET_IID(nsIFileSpec))) {
|
||||
nsCOMPtr<nsIFileSpec> file(do_CreateInstance(NS_FILESPEC_CONTRACTID, &rv));
|
||||
|
||||
@ -366,6 +373,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_WARNING("nsPrefBranch::GetComplexValue - Unsupported interface type");
|
||||
return NS_NOINTERFACE;
|
||||
@ -447,6 +455,7 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifndef MOZ_NO_XPCOM_OBSOLETE
|
||||
// This is deprecated and you should not be using it
|
||||
if (aType.Equals(NS_GET_IID(nsIFileSpec))) {
|
||||
nsCOMPtr<nsIFileSpec> file = do_QueryInterface(aValue);
|
||||
@ -458,6 +467,7 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_WARNING("nsPrefBranch::SetComplexValue - Unsupported interface type");
|
||||
return NS_NOINTERFACE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user