Merge last green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ed Morley 2012-01-10 17:57:29 +00:00
Родитель 898b04ab8a c7f19c0f8e
Коммит f90c2494a7
63 изменённых файлов: 727 добавлений и 280 удалений

Просмотреть файл

@ -59,18 +59,27 @@ TIERS += base
# tier "base" - basic setup # tier "base" - basic setup
# #
tier_base_dirs = \ tier_base_dirs = \
config \ config \
build \ build \
probes \ probes \
mfbt \ mfbt \
$(NULL) $(NULL)
ifndef LIBXUL_SDK ifndef LIBXUL_SDK
ifeq (android,$(MOZ_WIDGET_TOOLKIT)) ifeq (android,$(MOZ_WIDGET_TOOLKIT))
tier_base_dirs += other-licenses/android other-licenses/skia-npapi tier_base_dirs += \
other-licenses/android \
other-licenses/skia-npapi \
$(NULL)
endif endif
tier_base_dirs += memory ifdef MOZ_MEMORY
tier_base_dirs += memory/jemalloc
endif
tier_base_dirs += \
mozglue \
memory/mozalloc \
$(NULL)
endif endif
ifdef COMPILE_ENVIRONMENT ifdef COMPILE_ENVIRONMENT

Просмотреть файл

@ -74,9 +74,9 @@ extensions/Makefile
if [ ! "$LIBXUL_SDK" ]; then if [ ! "$LIBXUL_SDK" ]; then
add_makefiles " add_makefiles "
memory/Makefile
memory/mozalloc/Makefile memory/mozalloc/Makefile
memory/mozutils/Makefile mozglue/Makefile
mozglue/build/Makefile
" "
if [ "$MOZ_MEMORY" ]; then if [ "$MOZ_MEMORY" ]; then
add_makefiles " add_makefiles "
@ -87,6 +87,7 @@ if [ ! "$LIBXUL_SDK" ]; then
add_makefiles " add_makefiles "
other-licenses/android/Makefile other-licenses/android/Makefile
other-licenses/skia-npapi/Makefile other-licenses/skia-npapi/Makefile
mozglue/android/Makefile
" "
fi fi
fi fi

Просмотреть файл

@ -82,7 +82,7 @@
@BINPATH@/AndroidManifest.xml @BINPATH@/AndroidManifest.xml
@BINPATH@/resources.arsc @BINPATH@/resources.arsc
@BINPATH@/classes.dex @BINPATH@/classes.dex
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
@BINPATH@/res/drawable @BINPATH@/res/drawable
@BINPATH@/res/drawable-hdpi @BINPATH@/res/drawable-hdpi
@BINPATH@/res/layout @BINPATH@/res/layout

Просмотреть файл

@ -1 +1,2 @@
README.txt README.txt
@DLL_PREFIX@mozutils@DLL_SUFFIX@

Просмотреть файл

@ -1786,6 +1786,8 @@ function BrowserShutdown() {
gPrivateBrowsingUI.uninit(); gPrivateBrowsingUI.uninit();
TabsOnTop.uninit();
TabsInTitlebar.uninit(); TabsInTitlebar.uninit();
var enumerator = Services.wm.getEnumerator(null); var enumerator = Services.wm.getEnumerator(null);
@ -5291,6 +5293,10 @@ var TabsOnTop = {
Services.prefs.addObserver(this._prefName, this, false); Services.prefs.addObserver(this._prefName, this, false);
}, },
uninit: function TabsOnTop_uninit() {
Services.prefs.removeObserver(this._prefName, this);
},
toggle: function () { toggle: function () {
this.enabled = !Services.prefs.getBoolPref(this._prefName); this.enabled = !Services.prefs.getBoolPref(this._prefName);
}, },

Просмотреть файл

@ -44,7 +44,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#ifdef XP_MACOSX #ifdef XP_MACOSX
@BINPATH@/XUL @BINPATH@/XUL
#else #else

Просмотреть файл

@ -10,6 +10,7 @@
@DLL_PREFIX@xpistub@DLL_SUFFIX@ @DLL_PREFIX@xpistub@DLL_SUFFIX@
@DLL_PREFIX@zlib@DLL_SUFFIX@ @DLL_PREFIX@zlib@DLL_SUFFIX@
@DLL_PREFIX@jemalloc@DLL_SUFFIX@ @DLL_PREFIX@jemalloc@DLL_SUFFIX@
@DLL_PREFIX@mozutils@DLL_SUFFIX@
#ifdef MOZ_STATIC_JS #ifdef MOZ_STATIC_JS
@DLL_PREFIX@mozjs@DLL_SUFFIX@ @DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif #endif

Просмотреть файл

@ -62,7 +62,7 @@ CPPSRCS = crashinject.cpp
endif # ENABLE_TESTS endif # ENABLE_TESTS
MOZ_UTILS_LDFLAGS = MOZ_GLUE_LDFLAGS =
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -50,6 +50,6 @@ USE_STATIC_LIBS = 1
CPPSRCS = crashinjectdll.cpp CPPSRCS = crashinjectdll.cpp
MOZ_UTILS_LDFLAGS = MOZ_GLUE_LDFLAGS =
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -51,6 +51,6 @@ USE_STATIC_LIBS = 1
CPPSRCS = $(LIBRARY_NAME).cpp CPPSRCS = $(LIBRARY_NAME).cpp
MOZ_UTILS_LDFLAGS = MOZ_GLUE_LDFLAGS =
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -625,8 +625,8 @@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_QUANTIFY = @MOZ_QUANTIFY@ MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@ MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@ WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
MOZ_UTILS_LDFLAGS = @MOZ_UTILS_LDFLAGS@ MOZ_GLUE_LDFLAGS = @MOZ_GLUE_LDFLAGS@
MOZ_UTILS_PROGRAM_LDFLAGS = @MOZ_UTILS_PROGRAM_LDFLAGS@ MOZ_GLUE_PROGRAM_LDFLAGS = @MOZ_GLUE_PROGRAM_LDFLAGS@
WIN32_CRT_LIBS = @WIN32_CRT_LIBS@ WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
# This is used to pass jemalloc flags to NSS # This is used to pass jemalloc flags to NSS

Просмотреть файл

@ -243,13 +243,13 @@ endif # MOZ_DEBUG
# the Makefile wants static CRT linking. # the Makefile wants static CRT linking.
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1) ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
# Disable default CRT libs and add the right lib path for the linker # Disable default CRT libs and add the right lib path for the linker
MOZ_UTILS_LDFLAGS= MOZ_GLUE_LDFLAGS=
endif endif
endif # WINNT && !GNU_CC endif # WINNT && !GNU_CC
ifndef MOZ_UTILS_PROGRAM_LDFLAGS ifndef MOZ_GLUE_PROGRAM_LDFLAGS
MOZ_UTILS_PROGRAM_LDFLAGS=$(MOZ_UTILS_LDFLAGS) MOZ_GLUE_PROGRAM_LDFLAGS=$(MOZ_GLUE_LDFLAGS)
endif endif
# #

Просмотреть файл

@ -792,7 +792,7 @@ endif
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries # Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
DO_EXPAND_LIBS = $(foreach f,$(1),$(if $(filter %.$(LIB_SUFFIX),$(f)),$(if $(wildcard $(f).$(LIBS_DESC_SUFFIX)),$(f).$(LIBS_DESC_SUFFIX),$(if $(wildcard $(f)),$(f))))) DO_EXPAND_LIBS = $(foreach f,$(1),$(if $(filter %.$(LIB_SUFFIX),$(f)),$(if $(wildcard $(f).$(LIBS_DESC_SUFFIX)),$(f).$(LIBS_DESC_SUFFIX),$(if $(wildcard $(f)),$(f)))))
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_UTILS_PROGRAM_LDFLAGS)))) LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_GLUE_PROGRAM_LDFLAGS))))
SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS)) SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS))
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS)) HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))) DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)))
@ -893,7 +893,7 @@ alltags:
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS) $(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
@$(RM) $@.manifest @$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \ @if test -f $@.manifest; then \
if test -f "$(srcdir)/$@.manifest"; then \ if test -f "$(srcdir)/$@.manifest"; then \
@ -915,10 +915,10 @@ ifdef MOZ_PROFILE_GENERATE
endif endif
else # !WINNT || GNU_CC else # !WINNT || GNU_CC
ifeq ($(CPP_PROG_LINK),1) ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
@$(call CHECK_STDCXX,$@) @$(call CHECK_STDCXX,$@)
else # ! CPP_PROG_LINK else # ! CPP_PROG_LINK
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
endif # CPP_PROG_LINK endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC endif # WINNT && !GNU_CC
@ -964,7 +964,7 @@ endif
# #
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS) $(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \ @if test -f $@.manifest; then \
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
@ -973,10 +973,10 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool endif # MSVC with manifest tool
else else
ifeq ($(CPP_PROG_LINK),1) ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
@$(call CHECK_STDCXX,$@) @$(call CHECK_STDCXX,$@)
else else
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
endif # CPP_PROG_LINK endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC endif # WINNT && !GNU_CC
@ -1089,10 +1089,10 @@ ifdef DTRACE_LIB_DEPENDENT
ifndef XP_MACOSX ifndef XP_MACOSX
dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS)) dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
endif endif
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
@$(RM) $(DTRACE_PROBE_OBJ) @$(RM) $(DTRACE_PROBE_OBJ)
else # ! DTRACE_LIB_DEPENDENT else # ! DTRACE_LIB_DEPENDENT
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
endif # DTRACE_LIB_DEPENDENT endif # DTRACE_LIB_DEPENDENT
@$(call CHECK_STDCXX,$@) @$(call CHECK_STDCXX,$@)

Просмотреть файл

@ -550,20 +550,6 @@ if test -n "$CROSS_COMPILE" -a "$target" != "$host"; then
CFLAGS=$_SAVE_CFLAGS CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS LDFLAGS=$_SAVE_LDFLAGS
case "$build:$target" in
powerpc-apple-darwin8*:i?86-apple-darwin*)
dnl The Darwin cross compiler doesn't necessarily point itself at a
dnl root that has libraries for the proper architecture, it defaults
dnl to the system root. The libraries in the system root on current
dnl versions of PPC OS X 10.4 aren't fat, so these target compiler
dnl checks will fail. Fake a working SDK in that case.
_SAVE_CFLAGS=$CFLAGS
_SAVE_CXXFLAGS=$CXXLAGS
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk $CFLAGS"
CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk $CXXFLAGS"
;;
esac
AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :) AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :)
unset ac_cv_prog_CC unset ac_cv_prog_CC
AC_PROG_CC AC_PROG_CC
@ -571,16 +557,6 @@ if test -n "$CROSS_COMPILE" -a "$target" != "$host"; then
unset ac_cv_prog_CXX unset ac_cv_prog_CXX
AC_PROG_CXX AC_PROG_CXX
case "$build:$target" in
powerpc-apple-darwin8*:i?86-apple-darwin*)
dnl Revert the changes made above. From this point on, the target
dnl compiler will never be used without applying the SDK to CFLAGS
dnl (see --with-macos-sdk below).
CFLAGS=$_SAVE_CFLAGS
CXXFLAGS=$_SAVE_CXXFLAGS
;;
esac
AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :) AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :)
AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :) AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :)
MOZ_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :) MOZ_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :)
@ -1166,9 +1142,6 @@ case "$target" in
dnl No value specified on the command line or in the environment, dnl No value specified on the command line or in the environment,
dnl use architecture minimum. dnl use architecture minimum.
case "${target_cpu}" in case "${target_cpu}" in
ppc*)
export MACOSX_DEPLOYMENT_TARGET=10.5
;;
i*86) i*86)
export MACOSX_DEPLOYMENT_TARGET=10.5 export MACOSX_DEPLOYMENT_TARGET=10.5
;; ;;
@ -7138,17 +7111,17 @@ if test "$MOZ_DMD"; then
fi fi
if test "${OS_TARGET}" = "Android"; then if test "${OS_TARGET}" = "Android"; then
dnl On Android, we use WRAP_LDFLAGS to link everything to mozutils dnl On Android, we use WRAP_LDFLAGS to link everything to mozglue
: :
elif test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "OS2"; then elif test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "OS2"; then
dnl On Windows, OSX and OS2, we want to link all our binaries against mozutils dnl On Windows, OSX and OS2, we want to link all our binaries against mozglue
MOZ_UTILS_LDFLAGS='$(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib)' MOZ_GLUE_LDFLAGS='$(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib)'
else else
dnl On other Unix systems, we only want to link executables against mozutils dnl On other Unix systems, we only want to link executables against mozglue
MOZ_UTILS_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib) $(MKSHLIB_UNFORCE_ALL)' MOZ_GLUE_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib) $(MKSHLIB_UNFORCE_ALL)'
if test -n "$GNU_CC"; then if test -n "$GNU_CC"; then
dnl And we need mozutils symbols to be exported. dnl And we need mozglue symbols to be exported.
MOZ_UTILS_PROGRAM_LDFLAGS="$MOZ_UTILS_PROGRAM_LDFLAGS -rdynamic" MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS -rdynamic"
fi fi
fi fi
@ -7201,7 +7174,7 @@ else
AC_DEFINE(MOZ_MEMORY_LINUX) AC_DEFINE(MOZ_MEMORY_LINUX)
AC_DEFINE(MOZ_MEMORY_ANDROID) AC_DEFINE(MOZ_MEMORY_ANDROID)
_WRAP_MALLOC=1 _WRAP_MALLOC=1
MOZ_UTILS_LDFLAGS= MOZ_GLUE_LDFLAGS=
;; ;;
*-*linux*) *-*linux*)
AC_DEFINE(MOZ_MEMORY_LINUX) AC_DEFINE(MOZ_MEMORY_LINUX)
@ -7223,11 +7196,11 @@ else
WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj` WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
if grep -q '__imp__\{0,1\}free' crtdll.obj; then if grep -q '__imp__\{0,1\}free' crtdll.obj; then
MOZ_UTILS_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt' MOZ_GLUE_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
dnl Also pass this to NSPR/NSS dnl Also pass this to NSPR/NSS
DLLFLAGS="$DLLFLAGS $MOZ_UTILS_LDFLAGS" DLLFLAGS="$DLLFLAGS $MOZ_GLUE_LDFLAGS"
else else
DLLFLAGS="$DLLFLAGS -LIBPATH:\$(DIST)/lib -DEFAULTLIB:mozutils" DLLFLAGS="$DLLFLAGS -LIBPATH:\$(DIST)/lib -DEFAULTLIB:mozglue"
fi fi
rm crtdll.obj rm crtdll.obj
@ -7246,8 +7219,8 @@ else
AC_DEFINE(HAVE_JEMALLOC_MEMALIGN) AC_DEFINE(HAVE_JEMALLOC_MEMALIGN)
fi # MOZ_MEMORY fi # MOZ_MEMORY
AC_SUBST(MOZ_MEMORY) AC_SUBST(MOZ_MEMORY)
AC_SUBST(MOZ_UTILS_LDFLAGS) AC_SUBST(MOZ_GLUE_LDFLAGS)
AC_SUBST(MOZ_UTILS_PROGRAM_LDFLAGS) AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
AC_SUBST(WIN32_CRT_LIBS) AC_SUBST(WIN32_CRT_LIBS)
dnl Need to set this for make because NSS doesn't have configure dnl Need to set this for make because NSS doesn't have configure
AC_SUBST(DLLFLAGS) AC_SUBST(DLLFLAGS)
@ -7255,7 +7228,7 @@ AC_SUBST(DLLFLAGS)
dnl We need to wrap dlopen and related functions on Android because we use dnl We need to wrap dlopen and related functions on Android because we use
dnl our own linker. dnl our own linker.
if test "$OS_TARGET" = Android; then if test "$OS_TARGET" = Android; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -L$_objdir/dist/lib -lmozutils" WRAP_LDFLAGS="${WRAP_LDFLAGS} -L$_objdir/dist/lib -lmozglue"
if test "$MOZ_WIDGET_TOOLKIT" = android; then if test "$MOZ_WIDGET_TOOLKIT" = android; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=dlopen,--wrap=dlclose,--wrap=dlerror,--wrap=dlsym,--wrap=dladdr,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror" WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=dlopen,--wrap=dlclose,--wrap=dlerror,--wrap=dlsym,--wrap=dladdr,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror"
fi fi
@ -9088,11 +9061,11 @@ ac_configure_args="$ac_configure_args --prefix=$dist"
ac_configure_args="$ac_configure_args --with-sync-build-files=$_topsrcdir" ac_configure_args="$ac_configure_args --with-sync-build-files=$_topsrcdir"
if test "$MOZ_MEMORY"; then if test "$MOZ_MEMORY"; then
ac_configure_args="$ac_configure_args --enable-jemalloc" ac_configure_args="$ac_configure_args --enable-jemalloc"
if test -n "$MOZ_UTILS_LDFLAGS"; then if test -n "$MOZ_GLUE_LDFLAGS"; then
export MOZ_UTILS_LDFLAGS export MOZ_GLUE_LDFLAGS
fi fi
if test -n "$MOZ_UTILS_PROGRAM_LDFLAGS"; then if test -n "$MOZ_GLUE_PROGRAM_LDFLAGS"; then
export MOZ_UTILS_PROGRAM_LDFLAGS export MOZ_GLUE_PROGRAM_LDFLAGS
fi fi
fi fi
export MOZ_APP_NAME export MOZ_APP_NAME

Просмотреть файл

@ -1989,15 +1989,15 @@ private:
class NS_STACK_CLASS nsAutoScriptBlocker { class NS_STACK_CLASS nsAutoScriptBlocker {
public: public:
nsAutoScriptBlocker(MOZILLA_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) { nsAutoScriptBlocker(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
nsContentUtils::AddScriptBlocker(); nsContentUtils::AddScriptBlocker();
} }
~nsAutoScriptBlocker() { ~nsAutoScriptBlocker() {
nsContentUtils::RemoveScriptBlocker(); nsContentUtils::RemoveScriptBlocker();
} }
private: private:
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };
class NS_STACK_CLASS nsAutoScriptBlockerSuppressNodeRemoved : class NS_STACK_CLASS nsAutoScriptBlockerSuppressNodeRemoved :

Просмотреть файл

@ -381,11 +381,11 @@ private:
class NS_STACK_CLASS nsDOMFileInternalUrlHolder { class NS_STACK_CLASS nsDOMFileInternalUrlHolder {
public: public:
nsDOMFileInternalUrlHolder(nsIDOMBlob* aFile, nsIPrincipal* aPrincipal nsDOMFileInternalUrlHolder(nsIDOMBlob* aFile, nsIPrincipal* aPrincipal
MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM); MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~nsDOMFileInternalUrlHolder(); ~nsDOMFileInternalUrlHolder();
nsAutoString mUrl; nsAutoString mUrl;
private: private:
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };
#endif #endif

Просмотреть файл

@ -659,8 +659,8 @@ nsDOMFileError::GetCode(PRUint16* aCode)
nsDOMFileInternalUrlHolder::nsDOMFileInternalUrlHolder(nsIDOMBlob* aFile, nsDOMFileInternalUrlHolder::nsDOMFileInternalUrlHolder(nsIDOMBlob* aFile,
nsIPrincipal* aPrincipal nsIPrincipal* aPrincipal
MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) { MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
aFile->GetInternalUrl(aPrincipal, mUrl); aFile->GetInternalUrl(aPrincipal, mUrl);
} }

Просмотреть файл

@ -742,12 +742,12 @@ AllDescendantsOfType(nsIDocShellTreeItem* aParentItem, PRInt32 aType)
class NS_STACK_CLASS AutoResetInShow { class NS_STACK_CLASS AutoResetInShow {
private: private:
nsFrameLoader* mFrameLoader; nsFrameLoader* mFrameLoader;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
public: public:
AutoResetInShow(nsFrameLoader* aFrameLoader MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) AutoResetInShow(nsFrameLoader* aFrameLoader MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mFrameLoader(aFrameLoader) : mFrameLoader(aFrameLoader)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
} }
~AutoResetInShow() { mFrameLoader->mInShow = false; } ~AutoResetInShow() { mFrameLoader->mInShow = false; }
}; };

Просмотреть файл

@ -0,0 +1,2 @@
glsl-mat4-to-mat3.html

Просмотреть файл

@ -0,0 +1,70 @@
<!--
Copyright (c) 2011 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GLSL mat4 to mat3 test</title>
<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
<script src="../../../resources/js-test-pre.js"></script>
<script src="../../resources/webgl-test.js"> </script>
<script src="../../resources/webgl-test-utils.js"> </script>
<script src="../../resources/glsl-generator.js"> </script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script id="shader_emu" type="something-not-js">
mat3 mat3_emu(mat4 m4) {
return mat3(
m4[0][0], m4[0][1], m4[0][2],
m4[1][0], m4[1][1], m4[1][2],
m4[2][0], m4[2][1], m4[2][2]);
}
</script>
<script id="shader_test" type="something-not-js">
mat4 m4 = mat4($(input), $(input).yzwx, $(input).zwxy, $(input).wxyz);
mat3 m3 = $(conversion)(m4);
vec3 c;
if ($(input).y < 0.33) {
c = m3[0];
} else if ($(input).y > 0.66) {
c = m3[1];
} else {
c = m3[2];
}
$(output) = vec4(c, 1);
</script>
<script>
// See resources glsl-generator runBasicTest for how this works
var wtu = WebGLTestUtils;
GLSLGenerator.runBasicTest({
gridRes: 8,
tests: [
{
name: "mat4 to mat3",
reference: {
shader: wtu.getScript("shader_test"),
subs: {
emu: wtu.getScript("shader_emu"),
conversion: "mat3_emu"
}
},
test: {
shader: wtu.getScript("shader_test"),
subs: {
conversion: "mat3"
},
}
}
]
});
successfullyParsed = true;
</script>
</body>
</html>

Просмотреть файл

@ -5,7 +5,7 @@ invalid-passed-params.html
is-object.html is-object.html
null-object-behaviour.html null-object-behaviour.html
object-deletion-behaviour.html object-deletion-behaviour.html
#shader-precision-format.html shader-precision-format.html
type-conversion-test.html type-conversion-test.html
uninitialized-test.html uninitialized-test.html
webgl-specific.html webgl-specific.html

Просмотреть файл

@ -0,0 +1,83 @@
<!--
Copyright (c) 2011 Mozilla Foundation. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>WebGL shader precision format test.</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src="../../resources/js-test-pre.js"></script>
<script src="../resources/webgl-test.js"> </script>
<script src="../resources/webgl-test-utils.js"> </script>
</head>
<body>
<canvas id="canvas" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
<div id="description"></div>
<div id="console"></div>
<script>
var wtu = WebGLTestUtils;
description(document.title);
debug("Tests that WebGLShaderPrecisionFormat class and getShaderPrecisionFormat work.");
debug("");
var gl = create3DContext(document.getElementById("canvas"));
function verifyShaderPrecisionFormat(shadertype, precisiontype) {
shouldBeTrue('gl.getShaderPrecisionFormat(' + shadertype + ', ' +
precisiontype + ') instanceof WebGLShaderPrecisionFormat');
}
if (gl.getShaderPrecisionFormat == null || typeof gl.getShaderPrecisionFormat != 'function') {
debug("getShaderPrecisionFormat() function not found.");
} else {
debug("");
debug("Test that getShaderPrecisionFormat returns a WebGLShaderPrecisionFormat object.");
debug("");
verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.LOW_FLOAT');
verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.MEDIUM_FLOAT');
verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.HIGH_FLOAT');
verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.LOW_INT');
verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.MEDIUM_INT');
verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.HIGH_INT');
verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.LOW_FLOAT');
verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.MEDIUM_FLOAT');
verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.HIGH_FLOAT');
verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.LOW_INT');
verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.MEDIUM_INT');
verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.HIGH_INT');
debug("");
debug("Test that getShaderPrecisionFormat throws an error with invalid parameters.");
debug("");
shouldGenerateGLError(gl, gl.INVALID_ENUM, 'gl.getShaderPrecisionFormat(gl.HIGH_INT, gl.VERTEX_SHADER)');
debug("");
debug("Test that WebGLShaderPrecisionFormat values are sensible.");
debug("");
var shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT);
shouldBeTrue('shaderPrecisionFormat.rangeMin >= 0 && shaderPrecisionFormat.rangeMin <= 128');
shouldBeTrue('shaderPrecisionFormat.rangeMax >= 0 && shaderPrecisionFormat.rangeMax <= 128');
shouldBeTrue('shaderPrecisionFormat.precision >= 0 && shaderPrecisionFormat.precision <= 128');
debug("");
debug("Test that getShaderPrecisionFormat returns the same thing every call.");
debug("");
var shaderPrecisionFormat2 = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT);
shouldBeTrue('shaderPrecisionFormat.rangeMin == shaderPrecisionFormat2.rangeMin');
shouldBeTrue('shaderPrecisionFormat.rangeMax == shaderPrecisionFormat2.rangeMax');
shouldBeTrue('shaderPrecisionFormat.precision == shaderPrecisionFormat2.precision');
}
finishTest();
</script>
</body>
</html>

Просмотреть файл

@ -78,9 +78,9 @@ endif
endif endif
ifeq (Darwin,$(OS_TARGET)) ifeq (Darwin,$(OS_TARGET))
# On OSX, with jemalloc enabled, having sqlite linked against mozutils # On OSX, with jemalloc enabled, having sqlite linked against mozglue
# causes crashes in NSS standalone tools. # causes crashes in NSS standalone tools.
MOZ_UTILS_LDFLAGS = MOZ_GLUE_LDFLAGS =
endif endif
# XXX Force -O2 optimisation on Mac because using the default -O3 causes # XXX Force -O2 optimisation on Mac because using the default -O3 causes

Просмотреть файл

@ -278,7 +278,7 @@ public class GeckoAppShell
// The package data lib directory isn't placed in ld.so's // The package data lib directory isn't placed in ld.so's
// search path, so we have to manually load libraries that // search path, so we have to manually load libraries that
// libxul will depend on. Not ideal. // libxul will depend on. Not ideal.
System.loadLibrary("mozutils"); System.loadLibrary("mozglue");
GeckoApp geckoApp = GeckoApp.mAppContext; GeckoApp geckoApp = GeckoApp.mAppContext;
String homeDir; String homeDir;
if (Build.VERSION.SDK_INT < 8 || if (Build.VERSION.SDK_INT < 8 ||

Просмотреть файл

@ -49,7 +49,7 @@ main(int argc, char* argv[])
if (argc < 2) if (argc < 2)
return 1; return 1;
void *mozloader_handle = dlopen("libmozutils.so", RTLD_LAZY); void *mozloader_handle = dlopen("libmozglue.so", RTLD_LAZY);
if (!mozloader_handle) { if (!mozloader_handle) {
__android_log_print(ANDROID_LOG_ERROR, "GeckoChildLoad", __android_log_print(ANDROID_LOG_ERROR, "GeckoChildLoad",
"Couldn't load mozloader because %s", dlerror()); "Couldn't load mozloader because %s", dlerror());

Просмотреть файл

@ -311,8 +311,8 @@ MOZ_BROWSE_INFO = @MOZ_BROWSE_INFO@
MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_QUANTIFY = @MOZ_QUANTIFY@ MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@ MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
MOZ_UTILS_LDFLAGS = @MOZ_UTILS_LDFLAGS@ MOZ_GLUE_LDFLAGS = @MOZ_GLUE_LDFLAGS@
MOZ_UTILS_PROGRAM_LDFLAGS = @MOZ_UTILS_PROGRAM_LDFLAGS@ MOZ_GLUE_PROGRAM_LDFLAGS = @MOZ_GLUE_PROGRAM_LDFLAGS@
# Codesighs tools option, enables win32 mapfiles. # Codesighs tools option, enables win32 mapfiles.
MOZ_MAPINFO = @MOZ_MAPINFO@ MOZ_MAPINFO = @MOZ_MAPINFO@

Просмотреть файл

@ -243,13 +243,13 @@ endif # MOZ_DEBUG
# the Makefile wants static CRT linking. # the Makefile wants static CRT linking.
ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1) ifeq ($(MOZ_MEMORY)_$(USE_STATIC_LIBS),1_1)
# Disable default CRT libs and add the right lib path for the linker # Disable default CRT libs and add the right lib path for the linker
MOZ_UTILS_LDFLAGS= MOZ_GLUE_LDFLAGS=
endif endif
endif # WINNT && !GNU_CC endif # WINNT && !GNU_CC
ifndef MOZ_UTILS_PROGRAM_LDFLAGS ifndef MOZ_GLUE_PROGRAM_LDFLAGS
MOZ_UTILS_PROGRAM_LDFLAGS=$(MOZ_UTILS_LDFLAGS) MOZ_GLUE_PROGRAM_LDFLAGS=$(MOZ_GLUE_LDFLAGS)
endif endif
# #

Просмотреть файл

@ -792,7 +792,7 @@ endif
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries # Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
DO_EXPAND_LIBS = $(foreach f,$(1),$(if $(filter %.$(LIB_SUFFIX),$(f)),$(if $(wildcard $(f).$(LIBS_DESC_SUFFIX)),$(f).$(LIBS_DESC_SUFFIX),$(if $(wildcard $(f)),$(f))))) DO_EXPAND_LIBS = $(foreach f,$(1),$(if $(filter %.$(LIB_SUFFIX),$(f)),$(if $(wildcard $(f).$(LIBS_DESC_SUFFIX)),$(f).$(LIBS_DESC_SUFFIX),$(if $(wildcard $(f)),$(f)))))
LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_UTILS_PROGRAM_LDFLAGS)))) LIBS_DEPS = $(call DO_EXPAND_LIBS,$(filter %.$(LIB_SUFFIX),$(LIBS) $(if $(PROGRAM)$(SIMPLE_PROGRAMS),$(MOZ_GLUE_PROGRAM_LDFLAGS))))
SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS)) SHARED_LIBRARY_LIBS_DEPS = $(call DO_EXPAND_LIBS,$(SHARED_LIBRARY_LIBS))
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS)) HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))) DSO_LDOPTS_DEPS = $(call DO_EXPAND_LIBS,$(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)))
@ -893,7 +893,7 @@ alltags:
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS) $(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) $(GLOBAL_DEPS)
@$(RM) $@.manifest @$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(EXPAND_LD) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \ @if test -f $@.manifest; then \
if test -f "$(srcdir)/$@.manifest"; then \ if test -f "$(srcdir)/$@.manifest"; then \
@ -915,10 +915,10 @@ ifdef MOZ_PROFILE_GENERATE
endif endif
else # !WINNT || GNU_CC else # !WINNT || GNU_CC
ifeq ($(CPP_PROG_LINK),1) ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
@$(call CHECK_STDCXX,$@) @$(call CHECK_STDCXX,$@)
else # ! CPP_PROG_LINK else # ! CPP_PROG_LINK
$(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(EXPAND_CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
endif # CPP_PROG_LINK endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC endif # WINNT && !GNU_CC
@ -964,7 +964,7 @@ endif
# #
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS) $(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH)) ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(EXPAND_LD) -nologo -out:$@ -pdb:$(LINK_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \ @if test -f $@.manifest; then \
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
@ -973,10 +973,10 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool endif # MSVC with manifest tool
else else
ifeq ($(CPP_PROG_LINK),1) ifeq ($(CPP_PROG_LINK),1)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
@$(call CHECK_STDCXX,$@) @$(call CHECK_STDCXX,$@)
else else
$(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_UTILS_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXPAND_CC) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(WRAP_LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS)
endif # CPP_PROG_LINK endif # CPP_PROG_LINK
endif # WINNT && !GNU_CC endif # WINNT && !GNU_CC
@ -1089,10 +1089,10 @@ ifdef DTRACE_LIB_DEPENDENT
ifndef XP_MACOSX ifndef XP_MACOSX
dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS)) dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
endif endif
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
@$(RM) $(DTRACE_PROBE_OBJ) @$(RM) $(DTRACE_PROBE_OBJ)
else # ! DTRACE_LIB_DEPENDENT else # ! DTRACE_LIB_DEPENDENT
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_UTILS_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(MOZ_GLUE_LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
endif # DTRACE_LIB_DEPENDENT endif # DTRACE_LIB_DEPENDENT
@$(call CHECK_STDCXX,$@) @$(call CHECK_STDCXX,$@)

Просмотреть файл

@ -542,20 +542,6 @@ if test "$target" != "$host"; then
CFLAGS=$_SAVE_CFLAGS CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS LDFLAGS=$_SAVE_LDFLAGS
case "$build:$target" in
powerpc-apple-darwin8*:i?86-apple-darwin*)
dnl The Darwin cross compiler doesn't necessarily point itself at a
dnl root that has libraries for the proper architecture, it defaults
dnl to the system root. The libraries in the system root on current
dnl versions of PPC OS X 10.4 aren't fat, so these target compiler
dnl checks will fail. Fake a working SDK in that case.
_SAVE_CFLAGS=$CFLAGS
_SAVE_CXXFLAGS=$CXXLAGS
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk $CFLAGS"
CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk $CXXFLAGS"
;;
esac
AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :) AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :)
unset ac_cv_prog_CC unset ac_cv_prog_CC
AC_PROG_CC AC_PROG_CC
@ -563,16 +549,6 @@ if test "$target" != "$host"; then
unset ac_cv_prog_CXX unset ac_cv_prog_CXX
AC_PROG_CXX AC_PROG_CXX
case "$build:$target" in
powerpc-apple-darwin8*:i?86-apple-darwin*)
dnl Revert the changes made above. From this point on, the target
dnl compiler will never be used without applying the SDK to CFLAGS
dnl (see --with-macos-sdk below).
CFLAGS=$_SAVE_CFLAGS
CXXFLAGS=$_SAVE_CXXFLAGS
;;
esac
AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :) AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :)
AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :) AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :)
MOZ_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :) MOZ_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :)
@ -1142,9 +1118,6 @@ case "$target" in
dnl No value specified on the command line or in the environment, dnl No value specified on the command line or in the environment,
dnl use architecture minimum. dnl use architecture minimum.
case "${target_cpu}" in case "${target_cpu}" in
ppc*)
export MACOSX_DEPLOYMENT_TARGET=10.5
;;
i*86) i*86)
export MACOSX_DEPLOYMENT_TARGET=10.5 export MACOSX_DEPLOYMENT_TARGET=10.5
;; ;;
@ -4298,7 +4271,7 @@ if test "$MOZ_MEMORY"; then
;; ;;
*-mingw*) *-mingw*)
AC_DEFINE(MOZ_MEMORY_WINDOWS) AC_DEFINE(MOZ_MEMORY_WINDOWS)
# the interesting bits will get passed down in MOZ_UTILS_LDFLAGS # the interesting bits will get passed down in MOZ_GLUE_LDFLAGS
;; ;;
*) *)
AC_MSG_ERROR([--enable-jemalloc not supported on ${target}]) AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
@ -4313,8 +4286,8 @@ if test "$MOZ_MEMORY"; then
fi fi
fi fi
AC_SUBST(MOZ_MEMORY) AC_SUBST(MOZ_MEMORY)
AC_SUBST(MOZ_UTILS_LDFLAGS) AC_SUBST(MOZ_GLUE_LDFLAGS)
AC_SUBST(MOZ_UTILS_PROGRAM_LDFLAGS) AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
dnl ======================================================== dnl ========================================================
dnl = Use malloc wrapper lib dnl = Use malloc wrapper lib

Просмотреть файл

@ -3,10 +3,9 @@
var gTestfile = 'object-literal-accessor-property-name.js'; var gTestfile = 'object-literal-accessor-property-name.js';
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
var BUGNUMBER = 536472; var BUGNUMBER = 715682;
var summary = var summary =
'ES5: { get x(v) { } } and { set x(v, v2) { } } should be syntax errors'; "Permit numbers and strings containing numbers as accessor property names";
print(BUGNUMBER + ": " + summary); print(BUGNUMBER + ": " + summary);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

Просмотреть файл

@ -0,0 +1,281 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
//-----------------------------------------------------------------------------
var BUGNUMBER = 715821;
var summary = "Implement __define[GS]etter__ using Object.defineProperty";
print(BUGNUMBER + ": " + summary);
/*************
* UTILITIES *
*************/
function s(desc)
{
if (typeof desc === "undefined")
return "<undefined>";
assertEq(typeof desc, "object");
assertEq(desc !== null, true);
var str = "<enumerable: <" + desc.enumerable + ">, " +
" configurable: <" + desc.configurable + ">,";
if (desc.hasOwnProperty("value"))
{
return str +
" value: <" + desc.value + ">," +
" writable: <" + desc.writable + ">>";
}
return str +
" get: <" + desc.get + ">," +
" set: <" + desc.set + ">>";
}
function checkField(field, desc, expected)
{
var present = desc.hasOwnProperty(field);
assertEq(present, expected.hasOwnProperty(field),
field + " presence mismatch (got " + s(desc) + ", expected " + s(expected) + ")");
if (present)
{
assertEq(desc[field], expected[field],
field + " value mismatch (got " + s(desc) + ", expected " + s(expected) + ")");
}
}
function check(obj, prop, expected)
{
var desc = Object.getOwnPropertyDescriptor(obj, prop);
assertEq(typeof desc, typeof expected,
"type mismatch (got " + s(desc) + ", expected " + s(expected) + ")");
assertEq(desc.hasOwnProperty("get"), desc.hasOwnProperty("set"),
"bad descriptor: " + s(desc));
assertEq(desc.hasOwnProperty("value"), desc.hasOwnProperty("writable"),
"bad descriptor: " + s(desc));
assertEq(desc.hasOwnProperty("get"), !desc.hasOwnProperty("value"),
"bad descriptor: " + s(desc));
checkField("get", desc, expected);
checkField("set", desc, expected);
checkField("value", desc, expected);
checkField("writable", desc, expected);
checkField("enumerable", desc, expected);
checkField("configurable", desc, expected);
}
function expectTypeError(f)
{
try
{
f();
throw new Error("no error thrown");
}
catch (e)
{
assertEq(e instanceof TypeError, true,
"wrong error thrown: got " + e + ", not a TypeError");
}
}
/**************
* BEGIN TEST *
**************/
// Adding a new getter, overwriting an existing one
function g1() { }
var gobj = {};
gobj.__defineGetter__("foo", g1);
check(gobj, "foo", { get: g1, set: undefined, enumerable: true, configurable: true });
function g2() { }
gobj.__defineGetter__("foo", g2);
check(gobj, "foo", { get: g2, set: undefined, enumerable: true, configurable: true });
/******************************************************************************/
// Adding a new setter, overwriting an existing one
function s1() { }
var sobj = {};
sobj.__defineSetter__("bar", s1);
check(sobj, "bar", { get: undefined, set: s1, enumerable: true, configurable: true });
function s2() { }
sobj.__defineSetter__("bar", s2);
check(sobj, "bar", { get: undefined, set: s2, enumerable: true, configurable: true });
/******************************************************************************/
// Adding a new getter, then adding a setter
// Changing an existing accessor's enumerability, then "null"-changing the accessor
// Changing an accessor's configurability, then "null"-changing and real-changing the accessor
function g3() { }
var gsobj = {};
gsobj.__defineGetter__("baz", g3);
check(gsobj, "baz", { get: g3, set: undefined, enumerable: true, configurable: true });
function s3() { }
gsobj.__defineSetter__("baz", s3);
check(gsobj, "baz", { get: g3, set: s3, enumerable: true, configurable: true });
Object.defineProperty(gsobj, "baz", { enumerable: false });
check(gsobj, "baz", { get: g3, set: s3, enumerable: false, configurable: true });
gsobj.__defineGetter__("baz", g3);
check(gsobj, "baz", { get: g3, set: s3, enumerable: true, configurable: true });
Object.defineProperty(gsobj, "baz", { enumerable: false });
check(gsobj, "baz", { get: g3, set: s3, enumerable: false, configurable: true });
gsobj.__defineSetter__("baz", s3);
check(gsobj, "baz", { get: g3, set: s3, enumerable: true, configurable: true });
Object.defineProperty(gsobj, "baz", { configurable: false });
expectTypeError(function() { gsobj.__defineSetter__("baz", s2); });
expectTypeError(function() { gsobj.__defineSetter__("baz", s3); });
check(gsobj, "baz", { get: g3, set: s3, enumerable: true, configurable: false });
/******************************************************************************/
// Adding a new setter, then adding a getter
// Changing an existing accessor's enumerability, then "null"-changing the accessor
// Changing an accessor's configurability, then "null"-changing and real-changing the accessor
function s4() { }
var sgobj = {};
sgobj.__defineSetter__("baz", s4);
check(sgobj, "baz", { get: undefined, set: s4, enumerable: true, configurable: true });
function g4() { }
sgobj.__defineGetter__("baz", g4);
check(sgobj, "baz", { get: g4, set: s4, enumerable: true, configurable: true });
Object.defineProperty(sgobj, "baz", { enumerable: false });
check(sgobj, "baz", { get: g4, set: s4, enumerable: false, configurable: true });
sgobj.__defineSetter__("baz", s4);
check(sgobj, "baz", { get: g4, set: s4, enumerable: true, configurable: true });
Object.defineProperty(sgobj, "baz", { enumerable: false });
check(sgobj, "baz", { get: g4, set: s4, enumerable: false, configurable: true });
sgobj.__defineSetter__("baz", s4);
check(sgobj, "baz", { get: g4, set: s4, enumerable: true, configurable: true });
Object.defineProperty(sgobj, "baz", { configurable: false });
expectTypeError(function() { sgobj.__defineGetter__("baz", g3); });
expectTypeError(function() { sgobj.__defineSetter__("baz", s4); });
check(sgobj, "baz", { get: g4, set: s4, enumerable: true, configurable: false });
/******************************************************************************/
// Adding a getter over a writable data property
function g5() { }
var gover = { quux: 17 };
check(gover, "quux", { value: 17, writable: true, enumerable: true, configurable: true });
gover.__defineGetter__("quux", g5);
check(gover, "quux", { get: g5, set: undefined, enumerable: true, configurable: true });
/******************************************************************************/
// Adding a setter over a writable data property
function s5() { }
var sover = { quux: 17 };
check(sover, "quux", { value: 17, writable: true, enumerable: true, configurable: true });
sover.__defineSetter__("quux", s5);
check(sover, "quux", { get: undefined, set: s5, enumerable: true, configurable: true });
/******************************************************************************/
// Adding a getter over a non-writable data property
function g6() { }
var gnover = { eit: 17 };
check(gnover, "eit", { value: 17, writable: true, enumerable: true, configurable: true });
Object.defineProperty(gnover, "eit", { writable: false });
check(gnover, "eit", { value: 17, writable: false, enumerable: true, configurable: true });
gnover.__defineGetter__("eit", g6);
check(gnover, "eit", { get: g6, set: undefined, enumerable: true, configurable: true });
/******************************************************************************/
// Adding a setter over a non-writable data property
function s6() { }
var snover = { eit: 17 };
check(snover, "eit", { value: 17, writable: true, enumerable: true, configurable: true });
Object.defineProperty(snover, "eit", { writable: false });
check(snover, "eit", { value: 17, writable: false, enumerable: true, configurable: true });
snover.__defineSetter__("eit", s6);
check(snover, "eit", { get: undefined, set: s6, enumerable: true, configurable: true });
/******************************************************************************/
// Adding a getter over a non-configurable, writable data property
function g7() { }
var gncover = { moo: 17 };
check(gncover, "moo", { value: 17, writable: true, enumerable: true, configurable: true });
Object.defineProperty(gncover, "moo", { configurable: false });
check(gncover, "moo", { value: 17, writable: true, enumerable: true, configurable: false });
expectTypeError(function() { gncover.__defineGetter__("moo", g7); });
check(gncover, "moo", { value: 17, writable: true, enumerable: true, configurable: false });
/******************************************************************************/
// Adding a setter over a non-configurable, writable data property
function s7() { }
var sncover = { moo: 17 };
check(sncover, "moo", { value: 17, writable: true, enumerable: true, configurable: true });
Object.defineProperty(sncover, "moo", { configurable: false });
check(sncover, "moo", { value: 17, writable: true, enumerable: true, configurable: false });
expectTypeError(function() { sncover.__defineSetter__("moo", s7); });
check(sncover, "moo", { value: 17, writable: true, enumerable: true, configurable: false });
/******************************************************************************/
// Adding a getter over a non-configurable, non-writable data property
function g8() { }
var gncwover = { fwoosh: 17 };
check(gncwover, "fwoosh", { value: 17, writable: true, enumerable: true, configurable: true });
Object.defineProperty(gncwover, "fwoosh", { writable: false, configurable: false });
check(gncwover, "fwoosh", { value: 17, writable: false, enumerable: true, configurable: false });
expectTypeError(function() { gncwover.__defineGetter__("fwoosh", g7); });
check(gncwover, "fwoosh", { value: 17, writable: false, enumerable: true, configurable: false });
/******************************************************************************/
// Adding a setter over a non-configurable, non-writable data property
function s8() { }
var sncwover = { fwoosh: 17 };
check(sncwover, "fwoosh", { value: 17, writable: true, enumerable: true, configurable: true });
Object.defineProperty(sncwover, "fwoosh", { writable: false, configurable: false });
check(sncwover, "fwoosh", { value: 17, writable: false, enumerable: true, configurable: false });
expectTypeError(function() { sncwover.__defineSetter__("fwoosh", s7); });
check(sncwover, "fwoosh", { value: 17, writable: false, enumerable: true, configurable: false });
/******************************************************************************/
if (typeof reportCompare === "function")
reportCompare(true, true);
print("Tests complete");

Просмотреть файл

@ -12,6 +12,7 @@ script bug496985.js
script bug566661.js script bug566661.js
script array-toString-recursion.js script array-toString-recursion.js
skip-if(!xulRuntime.shell) script cross-global-eval-is-indirect.js # needs newGlobal() skip-if(!xulRuntime.shell) script cross-global-eval-is-indirect.js # needs newGlobal()
script es5ish-defineGetter-defineSetter.js
script eval-native-callback-is-indirect.js script eval-native-callback-is-indirect.js
script extension-methods-reject-null-undefined-this.js script extension-methods-reject-null-undefined-this.js
script function-caller-skips-eval-frames.js script function-caller-skips-eval-frames.js

Просмотреть файл

@ -370,10 +370,10 @@ public:
static void DestroyLock(XPCLock* lock) static void DestroyLock(XPCLock* lock)
{delete lock;} {delete lock;}
XPCAutoLock(XPCLock* lock MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) XPCAutoLock(XPCLock* lock MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mLock(lock) : mLock(lock)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (mLock) if (mLock)
mLock->Enter(); mLock->Enter();
} }
@ -387,7 +387,7 @@ public:
private: private:
XPCLock* mLock; XPCLock* mLock;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
// Not meant to be implemented. This makes it a compiler error to // Not meant to be implemented. This makes it a compiler error to
// construct or assign an XPCAutoLock object incorrectly. // construct or assign an XPCAutoLock object incorrectly.
@ -409,10 +409,10 @@ private:
class NS_STACK_CLASS XPCAutoUnlock { class NS_STACK_CLASS XPCAutoUnlock {
public: public:
XPCAutoUnlock(XPCLock* lock MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) XPCAutoUnlock(XPCLock* lock MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mLock(lock) : mLock(lock)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (mLock) { if (mLock) {
mLock->Exit(); mLock->Exit();
} }
@ -426,7 +426,7 @@ public:
private: private:
XPCLock* mLock; XPCLock* mLock;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
// Not meant to be implemented. This makes it a compiler error to // Not meant to be implemented. This makes it a compiler error to
// construct or assign an XPCAutoUnlock object incorrectly. // construct or assign an XPCAutoUnlock object incorrectly.
@ -3907,11 +3907,11 @@ class NS_STACK_CLASS AutoJSErrorAndExceptionEater
{ {
public: public:
AutoJSErrorAndExceptionEater(JSContext* aCX AutoJSErrorAndExceptionEater(JSContext* aCX
MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mCX(aCX), : mCX(aCX),
mOldErrorReporter(JS_SetErrorReporter(mCX, nsnull)), mOldErrorReporter(JS_SetErrorReporter(mCX, nsnull)),
mOldExceptionState(JS_SaveExceptionState(mCX)) { mOldExceptionState(JS_SaveExceptionState(mCX)) {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
} }
~AutoJSErrorAndExceptionEater() ~AutoJSErrorAndExceptionEater()
{ {
@ -3922,7 +3922,7 @@ private:
JSContext* mCX; JSContext* mCX;
JSErrorReporter mOldErrorReporter; JSErrorReporter mOldErrorReporter;
JSExceptionState* mOldExceptionState; JSExceptionState* mOldExceptionState;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };
/****************************************************************************** /******************************************************************************
@ -3936,10 +3936,10 @@ public:
* Saves the JSContext as well as initializing our state * Saves the JSContext as well as initializing our state
* @param cx The JSContext, this can be null, we don't do anything then * @param cx The JSContext, this can be null, we don't do anything then
*/ */
AutoScriptEvaluate(JSContext * cx MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) AutoScriptEvaluate(JSContext * cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mJSContext(cx), mState(0), mErrorReporterSet(false), : mJSContext(cx), mState(0), mErrorReporterSet(false),
mEvaluated(false), mContextHasThread(0) { mEvaluated(false), mContextHasThread(0) {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
} }
/** /**
@ -3961,7 +3961,7 @@ private:
bool mEvaluated; bool mEvaluated;
jsword mContextHasThread; jsword mContextHasThread;
JSAutoEnterCompartment mEnterCompartment; JSAutoEnterCompartment mEnterCompartment;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
// No copying or assignment allowed // No copying or assignment allowed
AutoScriptEvaluate(const AutoScriptEvaluate &) MOZ_DELETE; AutoScriptEvaluate(const AutoScriptEvaluate &) MOZ_DELETE;
@ -3973,11 +3973,11 @@ class NS_STACK_CLASS AutoResolveName
{ {
public: public:
AutoResolveName(XPCCallContext& ccx, jsid name AutoResolveName(XPCCallContext& ccx, jsid name
MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mTLS(ccx.GetThreadData()), : mTLS(ccx.GetThreadData()),
mOld(mTLS->SetResolveName(name)), mOld(mTLS->SetResolveName(name)),
mCheck(name) { mCheck(name) {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
} }
~AutoResolveName() ~AutoResolveName()
{ {
@ -3992,7 +3992,7 @@ private:
XPCPerThreadData* mTLS; XPCPerThreadData* mTLS;
jsid mOld; jsid mOld;
jsid mCheck; jsid mCheck;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };
/***************************************************************************/ /***************************************************************************/

Просмотреть файл

@ -68,21 +68,21 @@ namespace mozilla {
* *
* These classes are intended to be used only via the macros immediately * These classes are intended to be used only via the macros immediately
* below them: * below them:
* MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER declares (ifdef DEBUG) a member * MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER declares (ifdef DEBUG) a member
* variable, and should be put where a declaration of a private * variable, and should be put where a declaration of a private
* member variable would be placed. * member variable would be placed.
* MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM should be placed at the end of the * MOZ_GUARD_OBJECT_NOTIFIER_PARAM should be placed at the end of the
* parameters to each constructor of the guard object; it declares * parameters to each constructor of the guard object; it declares
* (ifdef DEBUG) an additional parameter. (But use the *_ONLY_PARAM * (ifdef DEBUG) an additional parameter. (But use the *_ONLY_PARAM
* variant for constructors that take no other parameters.) * variant for constructors that take no other parameters.)
* MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL should likewise be used in * MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL should likewise be used in
* the implementation of such constructors when they are not inline. * the implementation of such constructors when they are not inline.
* MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT should be used in * MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT should be used in
* the implementation of such constructors to pass the parameter to * the implementation of such constructors to pass the parameter to
* a base class that also uses these macros * a base class that also uses these macros
* MOZILLA_GUARD_OBJECT_NOTIFIER_INIT is a statement that belongs in each * MOZ_GUARD_OBJECT_NOTIFIER_INIT is a statement that belongs in each
* constructor. It uses the parameter declared by * constructor. It uses the parameter declared by
* MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM. * MOZ_GUARD_OBJECT_NOTIFIER_PARAM.
* *
* For more details, and examples of using these macros, see * For more details, and examples of using these macros, see
* https://developer.mozilla.org/en/Using_RAII_classes_in_Mozilla * https://developer.mozilla.org/en/Using_RAII_classes_in_Mozilla
@ -131,29 +131,29 @@ namespace mozilla {
} }
}; };
#define MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER \ #define MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER \
mozilla::GuardObjectNotificationReceiver _mCheckNotUsedAsTemporary; mozilla::GuardObjectNotificationReceiver _mCheckNotUsedAsTemporary;
#define MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM \ #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM \
, const mozilla::GuardObjectNotifier& _notifier = \ , const mozilla::GuardObjectNotifier& _notifier = \
mozilla::GuardObjectNotifier() mozilla::GuardObjectNotifier()
#define MOZILLA_GUARD_OBJECT_NOTIFIER_ONLY_PARAM \ #define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM \
const mozilla::GuardObjectNotifier& _notifier = \ const mozilla::GuardObjectNotifier& _notifier = \
mozilla::GuardObjectNotifier() mozilla::GuardObjectNotifier()
#define MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL \ #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL \
, const mozilla::GuardObjectNotifier& _notifier , const mozilla::GuardObjectNotifier& _notifier
#define MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT \ #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT \
, _notifier , _notifier
#define MOZILLA_GUARD_OBJECT_NOTIFIER_INIT \ #define MOZ_GUARD_OBJECT_NOTIFIER_INIT \
PR_BEGIN_MACRO _mCheckNotUsedAsTemporary.Init(_notifier); PR_END_MACRO PR_BEGIN_MACRO _mCheckNotUsedAsTemporary.Init(_notifier); PR_END_MACRO
#else /* defined(DEBUG) */ #else /* defined(DEBUG) */
#define MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER #define MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
#define MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM
#define MOZILLA_GUARD_OBJECT_NOTIFIER_ONLY_PARAM #define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM
#define MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL
#define MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT #define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT
#define MOZILLA_GUARD_OBJECT_NOTIFIER_INIT PR_BEGIN_MACRO PR_END_MACRO #define MOZ_GUARD_OBJECT_NOTIFIER_INIT PR_BEGIN_MACRO PR_END_MACRO
#endif /* !defined(DEBUG) */ #endif /* !defined(DEBUG) */

Просмотреть файл

@ -1417,7 +1417,7 @@ abstract public class GeckoApp
enableStrictMode(); enableStrictMode();
} }
System.loadLibrary("mozutils"); System.loadLibrary("mozglue");
mMainHandler = new Handler(); mMainHandler = new Handler();
Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - onCreate"); Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - onCreate");
if (savedInstanceState != null) { if (savedInstanceState != null) {

Просмотреть файл

@ -693,7 +693,7 @@ public class BrowserProvider extends ContentProvider {
String url = values.getAsString(Bookmarks.URL); String url = values.getAsString(Bookmarks.URL);
ContentValues imageValues = extractImageValues(values, url); ContentValues imageValues = extractImageValues(values, url);
Boolean isFolder = values.getAsBoolean(Bookmarks.IS_FOLDER); Boolean isFolder = values.getAsInteger(Bookmarks.IS_FOLDER) == 1;
if ((isFolder == null || !isFolder) && imageValues != null if ((isFolder == null || !isFolder) && imageValues != null
&& !TextUtils.isEmpty(url)) { && !TextUtils.isEmpty(url)) {

Просмотреть файл

@ -47,7 +47,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#ifdef XP_MACOSX #ifdef XP_MACOSX
@BINPATH@/XUL @BINPATH@/XUL
#else #else
@ -84,7 +84,6 @@
@BINPATH@/resources.arsc @BINPATH@/resources.arsc
@BINPATH@/package-name.txt @BINPATH@/package-name.txt
@BINPATH@/classes.dex @BINPATH@/classes.dex
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/res/drawable @BINPATH@/res/drawable
@BINPATH@/res/drawable-hdpi @BINPATH@/res/drawable-hdpi
@BINPATH@/res/layout @BINPATH@/res/layout

Просмотреть файл

@ -6,25 +6,26 @@ extensions/feedback@mobile.mozilla.org.xpi
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#if _MSC_VER != 1400 #if _MSC_VER != 1400
@BINPATH@/Microsoft.VC80.CRT.manifest Microsoft.VC80.CRT.manifest
@BINPATH@/msvcm80.dll msvcm80.dll
@BINPATH@/msvcp80.dll msvcp80.dll
@BINPATH@/msvcr80.dll msvcr80.dll
#endif #endif
#if _MSC_VER != 1500 #if _MSC_VER != 1500
@BINPATH@/Microsoft.VC90.CRT.manifest Microsoft.VC90.CRT.manifest
@BINPATH@/msvcm90.dll msvcm90.dll
@BINPATH@/msvcp90.dll msvcp90.dll
@BINPATH@/msvcr90.dll msvcr90.dll
#endif #endif
#if _MSC_VER != 1600 #if _MSC_VER != 1600
@BINPATH@/msvcp100.dll msvcp100.dll
@BINPATH@/msvcr100.dll msvcr100.dll
#endif #endif
#if _MSC_VER != 1700 #if _MSC_VER != 1700
@BINPATH@/msvcp110.dll msvcp110.dll
@BINPATH@/msvcr110.dll msvcr110.dll
#endif #endif
mozcrt19.dll mozcrt19.dll
mozcpp19.dll mozcpp19.dll
#endif #endif
@DLL_PREFIX@mozutils@DLL_SUFFIX@

Просмотреть файл

@ -47,7 +47,7 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
#ifdef XP_MACOSX #ifdef XP_MACOSX
@BINPATH@/XUL @BINPATH@/XUL
#else #else
@ -85,7 +85,6 @@
@BINPATH@/resources.arsc @BINPATH@/resources.arsc
@BINPATH@/package-name.txt @BINPATH@/package-name.txt
@BINPATH@/classes.dex @BINPATH@/classes.dex
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
@BINPATH@/res/drawable @BINPATH@/res/drawable
@BINPATH@/res/drawable-hdpi @BINPATH@/res/drawable-hdpi
@BINPATH@/res/layout @BINPATH@/res/layout

Просмотреть файл

@ -6,25 +6,26 @@ extensions/feedback@mobile.mozilla.org.xpi
#endif #endif
#ifdef XP_WIN #ifdef XP_WIN
#if _MSC_VER != 1400 #if _MSC_VER != 1400
@BINPATH@/Microsoft.VC80.CRT.manifest Microsoft.VC80.CRT.manifest
@BINPATH@/msvcm80.dll msvcm80.dll
@BINPATH@/msvcp80.dll msvcp80.dll
@BINPATH@/msvcr80.dll msvcr80.dll
#endif #endif
#if _MSC_VER != 1500 #if _MSC_VER != 1500
@BINPATH@/Microsoft.VC90.CRT.manifest Microsoft.VC90.CRT.manifest
@BINPATH@/msvcm90.dll msvcm90.dll
@BINPATH@/msvcp90.dll msvcp90.dll
@BINPATH@/msvcr90.dll msvcr90.dll
#endif #endif
#if _MSC_VER != 1600 #if _MSC_VER != 1600
@BINPATH@/msvcp100.dll msvcp100.dll
@BINPATH@/msvcr100.dll msvcr100.dll
#endif #endif
#if _MSC_VER != 1700 #if _MSC_VER != 1700
@BINPATH@/msvcp110.dll msvcp110.dll
@BINPATH@/msvcr110.dll msvcr110.dll
#endif #endif
mozcrt19.dll mozcrt19.dll
mozcpp19.dll mozcpp19.dll
#endif #endif
@DLL_PREFIX@mozutils@DLL_SUFFIX@

Просмотреть файл

@ -11,14 +11,15 @@
# for the specific language governing rights and limitations under the # for the specific language governing rights and limitations under the
# License. # License.
# #
# The Original Code is the Mozilla platform. # The Original Code is mozilla.org code.
# #
# The Initial Developer of the Original Code is # The Initial Developer of the Original Code is
# the Mozilla Foundation <http://www.mozilla.org/>. # Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2009 # Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved. # the Initial Developer. All Rights Reserved.
# #
# Contributor(s): # Contributor(s):
# Mike Hommey <mh@glandium.org>
# #
# Alternatively, the contents of this file may be used under the terms of # Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or # either the GNU General Public License Version 2 or later (the "GPL"), or
@ -34,20 +35,18 @@
# #
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
DEPTH = .. DEPTH = ..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
DIRS = DIRS =
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_MEMORY DIRS += android
DIRS += jemalloc
endif endif
DIRS += mozutils DIRS += build
DIRS += mozalloc
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,66 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Mozilla browser.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation
# Portions created by the Initial Developer are Copyright (C) 2010
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Brad Lassey <blassey@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = android
LIBRARY_NAME = android
FORCE_STATIC_LIB = 1
DEFINES += \
-DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
$(NULL)
CPPSRCS = \
nsGeckoUtils.cpp \
APKOpen.cpp \
$(NULL)
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/startup
LOCAL_INCLUDES += -I$(topsrcdir)/other-licenses/android
ifeq ($(CPU_ARCH),arm)
DEFINES += -DANDROID_ARM_LINKER
endif
EXPORTS = APKOpen.h
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -43,38 +43,38 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
MODULE = mozutils MODULE = mozglue
LIBRARY_NAME = mozutils LIBRARY_NAME = mozglue
DIST_INSTALL = 1 DIST_INSTALL = 1
ifdef MOZ_MEMORY ifdef MOZ_MEMORY
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,../jemalloc) SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
else else
# Temporary, until bug 662814 lands # Temporary, until bug 662814 lands
VISIBILITY_FLAGS = VISIBILITY_FLAGS =
CPPSRCS = dummy.cpp CPPSRCS = dummy.cpp
endif endif
# Build mozutils as a shared lib on Windows, OSX and Android. # Build mozglue as a shared lib on Windows, OSX and Android.
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET))) ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
FORCE_SHARED_LIB = 1 FORCE_SHARED_LIB = 1
else else
FORCE_STATIC_LIB = 1 FORCE_STATIC_LIB = 1
endif endif
MOZ_UTILS_LDFLAGS = # Don't link against ourselves MOZ_GLUE_LDFLAGS = # Don't link against ourselves
ifeq (WINNT,$(OS_TARGET)) ifeq (WINNT,$(OS_TARGET))
DEFFILE = mozutils.def DEFFILE = mozglue.def
mozutils.def: mozutils.def.in mozglue.def: mozglue.def.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(ACDEFINES) $< > $@ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(ACDEFINES) $< > $@
GARBAGE += mozutils.def GARBAGE += mozglue.def
LDFLAGS += -ENTRY:DllMain LDFLAGS += -ENTRY:DllMain
ifneq (,$(filter -DEFAULTLIB:mozcrt,$(MOZ_UTILS_LDFLAGS))) ifneq (,$(filter -DEFAULTLIB:mozcrt,$(MOZ_GLUE_LDFLAGS)))
# Don't install the import library if we use mozcrt # Don't install the import library if we use mozcrt
NO_INSTALL_IMPORT_LIBRARY = 1 NO_INSTALL_IMPORT_LIBRARY = 1
endif endif
@ -84,6 +84,7 @@ ifeq (android, $(MOZ_WIDGET_TOOLKIT))
# Add Android linker # Add Android linker
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,$(DEPTH)/other-licenses/android) SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,$(DEPTH)/other-licenses/android)
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,../android)
endif endif
ifeq (Android, $(OS_TARGET)) ifeq (Android, $(OS_TARGET))

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -33,7 +33,7 @@
; ;
; ***** END LICENSE BLOCK ***** ; ***** END LICENSE BLOCK *****
LIBRARY mozutils.dll LIBRARY mozglue.dll
EXPORTS EXPORTS
#ifdef MOZ_MEMORY #ifdef MOZ_MEMORY

Просмотреть файл

@ -51,7 +51,6 @@ DEFINES += \
-DMOZ_LINKER \ -DMOZ_LINKER \
-DLINKER_TEXT_BASE=0xB0001000 \ -DLINKER_TEXT_BASE=0xB0001000 \
-DLINKER_AREA_SIZE=0x01000000 \ -DLINKER_AREA_SIZE=0x01000000 \
-DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
$(NULL) $(NULL)
ifeq ($(CPU_ARCH),arm) ifeq ($(CPU_ARCH),arm)
@ -62,11 +61,6 @@ DEFINES += -DANDROID_X86_LINKER
endif endif
endif endif
CPPSRCS = \
nsGeckoUtils.cpp \
APKOpen.cpp \
$(NULL)
CSRCS = \ CSRCS = \
ba.c \ ba.c \
debugger.c \ debugger.c \
@ -92,8 +86,4 @@ CSRCS = \
rt.c \ rt.c \
$(NULL) $(NULL)
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/startup
EXPORTS = APKOpen.h
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -191,7 +191,7 @@ static void insert_soinfo_into_debug_map(soinfo * info)
map->l_name = (char*) info->name; map->l_name = (char*) info->name;
map->l_ld = (uintptr_t)info->dynamic; map->l_ld = (uintptr_t)info->dynamic;
/* Stick the new library before libmozutils.so /* Stick the new library before libmozglue.so
*/ */
if (!_r_debug) if (!_r_debug)
return; return;
@ -2449,7 +2449,7 @@ void simple_linker_init(void)
* load before that */ * load before that */
struct link_map *map = debug->r_map; struct link_map *map = debug->r_map;
while (map) { while (map) {
if (strcmp(map->l_name, "libmozutils.so")) if (strcmp(map->l_name, "libmozglue.so"))
r_debug_insert = map; r_debug_insert = map;
map = map->l_next; map = map->l_next;
} }

Просмотреть файл

@ -262,12 +262,7 @@ DEFAULT_GMAKE_FLAGS += \
STANDARDS_CFLAGS="-std=gnu89" \ STANDARDS_CFLAGS="-std=gnu89" \
$(NULL) $(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
DEFAULT_GMAKE_FLAGS += ARCHFLAG="$(CFLAGS) -DCHECK_FORK_GETPID -DRTLD_NOLOAD=0 -DANDROID_VERSION=$(ANDROID_VERSION) -include $(ABS_topsrcdir)/security/manager/android_stub.h"
else
DEFAULT_GMAKE_FLAGS += ARCHFLAG="$(CFLAGS) -DCHECK_FORK_GETPID -DRTLD_NOLOAD=0 -include $(ABS_topsrcdir)/security/manager/android_stub.h" DEFAULT_GMAKE_FLAGS += ARCHFLAG="$(CFLAGS) -DCHECK_FORK_GETPID -DRTLD_NOLOAD=0 -include $(ABS_topsrcdir)/security/manager/android_stub.h"
endif
endif endif
endif endif
@ -278,6 +273,8 @@ DEFAULT_GMAKE_FLAGS += \
$(NULL) $(NULL)
endif endif
DEFAULT_GMAKE_FLAGS += FREEBL_NO_DEPEND=0
SUBMAKEFILES = boot/Makefile ssl/Makefile pki/Makefile locales/Makefile SUBMAKEFILES = boot/Makefile ssl/Makefile pki/Makefile locales/Makefile
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -40,19 +40,6 @@
#ifndef ANDROID_STUB_H #ifndef ANDROID_STUB_H
#define ANDROID_STUB_H #define ANDROID_STUB_H
#include "dlfcn.h"
#ifdef ANDROID_VERSION
#if ANDROID_VERSION < 8
/* because dladdr isn't supported in android 2.1 and older.
* however, it exists in the android repos so.. maybe someday. */
typedef struct {
char *dli_fname;
} Dl_info;
#define dladdr(foo, bar) 0
#endif
#endif
/* sysinfo is defined but not implemented. /* sysinfo is defined but not implemented.
* we may be able to implement it ourselves. */ * we may be able to implement it ourselves. */
#define _SYS_SYSINFO_H_ #define _SYS_SYSINFO_H_

Просмотреть файл

@ -56,11 +56,7 @@ LOCAL_INCLUDES = \
-I$(topsrcdir)/js/src/ctypes \ -I$(topsrcdir)/js/src/ctypes \
$(NULL) $(NULL)
EXTRA_DSO_LDOPTS += \ EXTRA_DSO_LDOPTS += $(MOZALLOC_LIB)
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
$(MOZALLOC_LIB) \
$(NSPR_LIBS) \
$(NULL)
XPCSHELL_TESTS = unit XPCSHELL_TESTS = unit

Просмотреть файл

@ -40,7 +40,6 @@
#include "jsctypes-test.h" #include "jsctypes-test.h"
#include "nsCRTGlue.h" #include "nsCRTGlue.h"
#include <string.h>
#include <math.h> #include <math.h>
#include <stdarg.h> #include <stdarg.h>
@ -161,16 +160,24 @@ get_##name##_stats(size_t* align, size_t* size, size_t* nalign, size_t* nsize, \
} }
#include "typedefs.h" #include "typedefs.h"
template <typename T>
PRInt32 StrLen(const T* string)
{
const T *end;
for (end = string; *end; ++end);
return end - string;
}
PRInt32 PRInt32
test_ansi_len(const char* string) test_ansi_len(const char* string)
{ {
return PRInt32(strlen(string)); return StrLen(string);
} }
PRInt32 PRInt32
test_wide_len(const PRUnichar* string) test_wide_len(const PRUnichar* string)
{ {
return PRInt32(NS_strlen(string)); return StrLen(string);
} }
const char * const char *

Просмотреть файл

@ -84,10 +84,10 @@ base::Histogram* GetHistogramById(ID id);
template<ID id> template<ID id>
class AutoTimer { class AutoTimer {
public: public:
AutoTimer(TimeStamp aStart = TimeStamp::Now() MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) AutoTimer(TimeStamp aStart = TimeStamp::Now() MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: start(aStart) : start(aStart)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
} }
~AutoTimer() { ~AutoTimer() {
@ -96,7 +96,7 @@ public:
private: private:
const TimeStamp start; const TimeStamp start;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };
/** /**

Просмотреть файл

@ -55,9 +55,9 @@ ifneq ($(OS_TARGET),Android)
PROGRAM = crashreporter$(BIN_SUFFIX) PROGRAM = crashreporter$(BIN_SUFFIX)
DIST_PROGRAM = crashreporter$(BIN_SUFFIX) DIST_PROGRAM = crashreporter$(BIN_SUFFIX)
# Don't link the updater against libmozutils. # Don't link the updater against libmozglue.
MOZ_UTILS_LDFLAGS = MOZ_GLUE_LDFLAGS =
MOZ_UTILS_PROGRAM_LDFLAGS = MOZ_GLUE_PROGRAM_LDFLAGS =
endif endif
LOCAL_INCLUDES = -I$(srcdir)/../google-breakpad/src LOCAL_INCLUDES = -I$(srcdir)/../google-breakpad/src

Просмотреть файл

@ -491,7 +491,7 @@ endif
ifeq ($(OS_ARCH),Darwin) ifeq ($(OS_ARCH),Darwin)
ifdef MOZ_SYDNEYAUDIO ifdef MOZ_SYDNEYAUDIO
EXTRA_DSO_LDOPTS += \ OS_LIBS += \
-framework Carbon \ -framework Carbon \
-framework CoreAudio \ -framework CoreAudio \
-framework AudioToolbox \ -framework AudioToolbox \
@ -567,6 +567,8 @@ OS_LIBS += $(call EXPAND_LIBNAME,delayimp)
EXTRA_DSO_LDOPTS += \ EXTRA_DSO_LDOPTS += \
-DELAYLOAD:rasapi32.dll \ -DELAYLOAD:rasapi32.dll \
-DELAYLOAD:rasdlg.dll \ -DELAYLOAD:rasdlg.dll \
-DELAYLOAD:comdlg32.dll \
-DELAYLOAD:winspool.drv \
$(NULL) $(NULL)
endif endif
endif # WINNT endif # WINNT

Просмотреть файл

@ -86,7 +86,7 @@ SDK = $(SDK_PATH)$(PKG_BASENAME).sdk$(SDK_SUFFIX)
ifndef LIBXUL_SDK ifndef LIBXUL_SDK
JSSHELL_BINS = \ JSSHELL_BINS = \
$(DIST)/bin/js$(BIN_SUFFIX) \ $(DIST)/bin/js$(BIN_SUFFIX) \
$(DIST)/bin/mozutils$(DLL_SUFFIX) \ $(DIST)/bin/mozglue$(DLL_SUFFIX) \
$(NULL) $(NULL)
ifndef MOZ_NATIVE_NSPR ifndef MOZ_NATIVE_NSPR
JSSHELL_BINS += $(DIST)/bin/$(LIB_PREFIX)nspr4$(DLL_SUFFIX) JSSHELL_BINS += $(DIST)/bin/$(LIB_PREFIX)nspr4$(DLL_SUFFIX)
@ -335,7 +335,7 @@ INNER_MAKE_PACKAGE = \
cp $(GECKO_APP_AP_PATH)/gecko.ap_ $(_ABS_DIST) && \ cp $(GECKO_APP_AP_PATH)/gecko.ap_ $(_ABS_DIST) && \
( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \ ( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
mkdir -p lib/$(ABI_DIR) && \ mkdir -p lib/$(ABI_DIR) && \
mv libmozutils.so $(MOZ_CHILD_PROCESS_NAME) lib/$(ABI_DIR) && \ mv libmozglue.so $(MOZ_CHILD_PROCESS_NAME) lib/$(ABI_DIR) && \
rm -f lib.id && \ rm -f lib.id && \
for SOMELIB in *.so ; \ for SOMELIB in *.so ; \
do \ do \
@ -355,7 +355,7 @@ INNER_UNMAKE_PACKAGE = \
mkdir $(MOZ_PKG_DIR) && \ mkdir $(MOZ_PKG_DIR) && \
pushd $(MOZ_PKG_DIR) && \ pushd $(MOZ_PKG_DIR) && \
$(UNZIP) $(UNPACKAGE) && \ $(UNZIP) $(UNPACKAGE) && \
mv lib/$(ABI_DIR)/libmozutils.so . && \ mv lib/$(ABI_DIR)/libmozglue.so . && \
mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \ mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \
rm -rf lib/$(ABI_DIR) && \ rm -rf lib/$(ABI_DIR) && \
popd popd

Просмотреть файл

@ -51,9 +51,9 @@ CPPSRCS = \
PROGRAM = updater$(BIN_SUFFIX) PROGRAM = updater$(BIN_SUFFIX)
# Don't link the updater against libmozutils. See bug 687139 # Don't link the updater against libmozglue. See bug 687139
MOZ_UTILS_LDFLAGS = MOZ_GLUE_LDFLAGS =
MOZ_UTILS_PROGRAM_LDFLAGS = MOZ_GLUE_PROGRAM_LDFLAGS =
LOCAL_INCLUDES += -I$(srcdir)/../../readstrings \ LOCAL_INCLUDES += -I$(srcdir)/../../readstrings \
-I$(srcdir)/../common -I$(srcdir)/../common

Просмотреть файл

@ -62,6 +62,8 @@ typedef struct _GVariant GVariant;
# define G_VARIANT_TYPE_STRING ((const GVariantType *) "s") # define G_VARIANT_TYPE_STRING ((const GVariantType *) "s")
# define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o") # define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o")
# define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g") # define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g")
#endif
#ifndef G_VARIANT_TYPE_STRING_ARRAY
# define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as") # define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as")
#endif #endif

Просмотреть файл

@ -62,12 +62,12 @@ namespace mozilla {
private: private:
T& mLocation; T& mLocation;
T mValue; T mValue;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
public: public:
AutoRestore(T& aValue MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) AutoRestore(T& aValue MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: mLocation(aValue), mValue(aValue) : mLocation(aValue), mValue(aValue)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
} }
~AutoRestore() { mLocation = mValue; } ~AutoRestore() { mLocation = mValue; }
}; };

Просмотреть файл

@ -176,10 +176,10 @@ public:
* @param aLock A valid mozilla::Mutex* returned by * @param aLock A valid mozilla::Mutex* returned by
* mozilla::Mutex::NewMutex. * mozilla::Mutex::NewMutex.
**/ **/
MutexAutoLock(mozilla::Mutex& aLock MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) : MutexAutoLock(mozilla::Mutex& aLock MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
mLock(&aLock) mLock(&aLock)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
NS_ASSERTION(mLock, "null mutex"); NS_ASSERTION(mLock, "null mutex");
mLock->Lock(); mLock->Lock();
} }
@ -196,7 +196,7 @@ private:
static void operator delete(void*); static void operator delete(void*);
mozilla::Mutex* mLock; mozilla::Mutex* mLock;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };
@ -210,10 +210,10 @@ private:
class NS_COM_GLUE NS_STACK_CLASS MutexAutoUnlock class NS_COM_GLUE NS_STACK_CLASS MutexAutoUnlock
{ {
public: public:
MutexAutoUnlock(mozilla::Mutex& aLock MOZILLA_GUARD_OBJECT_NOTIFIER_PARAM) : MutexAutoUnlock(mozilla::Mutex& aLock MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
mLock(&aLock) mLock(&aLock)
{ {
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
NS_ASSERTION(mLock, "null lock"); NS_ASSERTION(mLock, "null lock");
mLock->Unlock(); mLock->Unlock();
} }
@ -231,7 +231,7 @@ private:
static void operator delete(void*); static void operator delete(void*);
mozilla::Mutex* mLock; mozilla::Mutex* mLock;
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
}; };