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

This commit is contained in:
Ehsan Akhgari 2012-06-20 10:57:02 -04:00
commit d43f8ef92b
37 changed files with 184 additions and 281 deletions

View File

@ -117,7 +117,6 @@ if [ "$ENABLE_MARIONETTE" ]; then
add_makefiles "
testing/marionette/Makefile
testing/marionette/components/Makefile
testing/marionette/tests/Makefile
"
fi

View File

@ -139,7 +139,7 @@ foreach $ac_file (@makefiles) {
}
open (INFILE, "<$ac_file_in")
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
or ( die "can't read $ac_file_in: No such file or directory\n");
open (OUTFILE, ">$ac_file")
or ( warn "Unable to create $ac_file\n" and next);

View File

@ -54,7 +54,7 @@ dnl Set the version number of the libs included with mozilla
dnl ========================================================
MOZJPEG=62
MOZPNG=10509
MOZZLIB=0x1230
MOZZLIB=1.2.3
NSPR_VERSION=4
NSS_VERSION=3
@ -219,7 +219,6 @@ if test -n "$gonkdir" ; then
AC_DEFINE(HAVE_PTHREADS)
CROSS_COMPILE=1
MOZ_CHROME_FILE_FORMAT=omni
ZLIB_DIR=yes
direct_nspr_config=1
else
MOZ_ANDROID_NDK
@ -809,8 +808,6 @@ AC_SUBST(GNU_CC)
AC_SUBST(GNU_CXX)
AC_SUBST(INTEL_CC)
AC_SUBST(INTEL_CXX)
AC_SUBST(CLANG_CC)
AC_SUBST(CLANG_CXX)
AC_SUBST(STL_FLAGS)
AC_SUBST(WRAP_STL_INCLUDES)
@ -1728,7 +1725,6 @@ if test -n "$MOZ_DMD"; then
[--enable-dmd specified but Valgrind is not installed]))
AC_DEFINE(MOZ_DMD)
fi
AC_SUBST(MOZ_DMD)
dnl ========================================================
dnl jprof
@ -1895,7 +1891,6 @@ dnl ========================================================
AC_MSG_CHECKING(for custom <stdint.h> implementation)
if test "$MOZ_CUSTOM_STDINT_H"; then
AC_DEFINE_UNQUOTED(MOZ_CUSTOM_STDINT_H, "$MOZ_CUSTOM_STDINT_H")
AC_SUBST(MOZ_CUSTOM_STDINT_H)
AC_MSG_RESULT(using $MOZ_CUSTOM_STDINT_H)
else
AC_MSG_RESULT(none specified)
@ -4057,7 +4052,7 @@ if test "$SYSTEM_JPEG" = 1; then
#error "Insufficient JPEG library version ($MOZJPEG required)."
#endif ],
SYSTEM_JPEG=1,
[SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=])
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
@ -4090,14 +4085,15 @@ else
fi
if test "$SYSTEM_ZLIB" = 1; then
LIBS="$ZLIB_LIBS $LIBS"
MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'`
AC_TRY_COMPILE([ #include <stdio.h>
#include <string.h>
#include <zlib.h> ],
[ #if ZLIB_VERNUM < $MOZZLIB
#error "Insufficient zlib version ($MOZZLIB required)."
[ #if ZLIB_VERNUM < $MOZZLIBNUM
#error "Insufficient zlib version ($MOZZLIBNUM required)."
#endif ],
SYSTEM_ZLIB=1,
[SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=])
AC_MSG_ERROR([Insufficient zlib version for --with-system-zlib ($MOZZLIB required)]))
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
@ -8285,7 +8281,6 @@ AC_SUBST(MOZ_DEBUG_LDFLAGS)
AC_SUBST(WARNINGS_AS_ERRORS)
AC_SUBST(MOZ_EXTENSIONS)
AC_SUBST(MOZ_JSDEBUGGER)
AC_SUBST(MOZ_LOG_REFCNT)
AC_SUBST(MOZ_ENABLE_PROFILER_SPS)
AC_SUBST(MOZ_JPROF)
AC_SUBST(MOZ_SHARK)
@ -8293,7 +8288,6 @@ AC_SUBST(MOZ_CALLGRIND)
AC_SUBST(MOZ_VTUNE)
AC_SUBST(MOZ_ETW)
AC_SUBST(MOZ_PROFILING)
AC_SUBST(MOZ_QUANTIFY)
AC_SUBST(LIBICONV)
AC_SUBST(MOZ_PLACES)
AC_SUBST(MOZ_TOOLKIT_SEARCH)
@ -8316,7 +8310,6 @@ AC_SUBST(ACCESSIBILITY)
AC_SUBST(MOZ_SPELLCHECK)
AC_SUBST(MOZ_JAVA_COMPOSITOR)
AC_SUBST(MOZ_ONLY_TOUCH_EVENTS)
AC_SUBST(MOZ_USER_DIR)
AC_SUBST(MOZ_CRASHREPORTER)
AC_SUBST(MOZ_MAINTENANCE_SERVICE)
AC_SUBST(MOZ_VERIFY_MAR_SIGNATURE)
@ -8564,7 +8557,6 @@ AC_SUBST(OS_TEST)
AC_SUBST(CPU_ARCH)
AC_SUBST(INTEL_ARCHITECTURE)
AC_SUBST(MOZ_DISABLE_JAR_PACKAGING)
AC_SUBST(MOZ_CHROME_FILE_FORMAT)
AC_SUBST(WRAP_LDFLAGS)
@ -8870,6 +8862,10 @@ dnl
dnl This does not change the $MAKEFILES variable.
dnl
echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
res="$?"
if test "$res" != 0; then
exit $res
fi
. ./conftest.sh
rm conftest.sh

View File

@ -175,7 +175,7 @@ NetworkManager.prototype = {
break;
}
}
if (this.active && (oldActive != this.active)) {
if (this.active) {
this.setDefaultRouteAndDNS(oldActive);
}
},
@ -185,7 +185,7 @@ NetworkManager.prototype = {
let options = {
cmd: this.active.dhcp ? "runDHCPAndSetDefaultRouteAndDNS" : "setDefaultRouteAndDNS",
ifname: this.active.name,
oldIfname: oldInterface ? oldInterface.name : null
oldIfname: (oldInterface && oldInterface != this.active) ? oldInterface.name : null
};
this.worker.postMessage(options);
},

View File

@ -94,6 +94,8 @@ function convertRILCallState(state) {
case RIL.CALL_STATE_INCOMING:
case RIL.CALL_STATE_WAITING:
return nsIRadioInterfaceLayer.CALL_STATE_INCOMING;
case RIL.CALL_STATE_BUSY:
return nsIRadioInterfaceLayer.CALL_STATE_BUSY;
default:
throw new Error("Unknown rilCallState: " + state);
}

View File

@ -370,6 +370,7 @@ const CALL_STATE_DIALING = 2;
const CALL_STATE_ALERTING = 3;
const CALL_STATE_INCOMING = 4;
const CALL_STATE_WAITING = 5;
const CALL_STATE_BUSY = 6;
const TOA_INTERNATIONAL = 0x91;
const TOA_UNKNOWN = 0x81;

View File

@ -2229,7 +2229,7 @@ let RIL = {
// Call is no longer reported by the radio. Remove from our map and
// send disconnected state change.
delete this.currentCalls[currentCall.callIndex];
this._handleDisconnectedCall(currentCall);
this.getFailCauseCode(currentCall);
}
}
@ -2875,9 +2875,28 @@ RIL[REQUEST_LAST_CALL_FAIL_CAUSE] = function REQUEST_LAST_CALL_FAIL_CAUSE(length
}
let failCause = Buf.readUint32();
options.type = "callError";
options.error = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
this.sendDOMMessage(options);
switch (failCause) {
case CALL_FAIL_NORMAL:
this._handleDisconnectedCall(options);
break;
case CALL_FAIL_BUSY:
options.state = CALL_STATE_BUSY;
this._handleChangedCallState(options);
this._handleDisconnectedCall(options);
break;
case CALL_FAIL_UNOBTAINABLE_NUMBER:
case CALL_FAIL_CONGESTION:
case CALL_FAIL_ACM_LIMIT_EXCEEDED:
case CALL_FAIL_CALL_BARRED:
case CALL_FAIL_FDN_BLOCKED:
case CALL_FAIL_IMSI_UNKNOWN_IN_VLR:
case CALL_FAIL_IMEI_NOT_ACCEPTED:
case CALL_FAIL_ERROR_UNSPECIFIED:
options.type = "callError";
options.error = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
this.sendDOMMessage(options);
break;
}
};
RIL[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) {
if (options.rilRequestError) {

View File

@ -2371,7 +2371,7 @@ GLContext::TexImage2D(GLenum target, GLint level, GLint internalformat,
{
if (mIsGLES2) {
NS_ASSERTION(format == internalformat,
NS_ASSERTION(format == (GLenum)internalformat,
"format and internalformat not the same for glTexImage2D on GLES2");
if (!CanUploadNonPowerOfTwo()

View File

@ -144,8 +144,11 @@ static GLLibraryEGL sEGLLibrary;
(_array).AppendElement(_k); \
} while (0)
#ifndef MOZ_JAVA_COMPOSITOR
static EGLSurface
CreateSurfaceForWindow(nsIWidget *aWidget, EGLConfig config);
#endif
static bool
CreateConfig(EGLConfig* aConfig);
#ifdef MOZ_X11
@ -812,10 +815,10 @@ public:
: TextureImage(aSize, aWrapMode, aContentType, aFlags)
, mGLContext(aContext)
, mUpdateFormat(gfxASurface::ImageFormatUnknown)
, mEGLImage(nsnull)
, mTexture(aTexture)
, mSurface(nsnull)
, mConfig(nsnull)
, mTexture(aTexture)
, mEGLImage(nsnull)
, mTextureState(Created)
, mBound(false)
, mIsLocked(false)
@ -1568,14 +1571,12 @@ CreateConfig(EGLConfig* aConfig)
}
}
// When MOZ_JAVA_COMPOSITOR is defined,
// use mozilla::AndroidBridge::Bridge()->ProvideEGLSurface() instead.
#ifndef MOZ_JAVA_COMPOSITOR
static EGLSurface
CreateSurfaceForWindow(nsIWidget *aWidget, EGLConfig config)
{
#ifdef MOZ_JAVA_COMPOSITOR
// Use mozilla::AndroidBridge::Bridge()->ProvideEGLSurface() instead.
NS_RUNTIMEABORT("CreateSurfaceForWindow should not be called on Native Fennec.");
#endif
EGLSurface surface;
#ifdef DEBUG
@ -1610,6 +1611,7 @@ CreateSurfaceForWindow(nsIWidget *aWidget, EGLConfig config)
return surface;
}
#endif
already_AddRefed<GLContext>
GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget)

View File

@ -13,6 +13,7 @@ MODULE = gl
LIBRARY_NAME = gl
LIBXUL_LIBRARY = 1
EXPORT_LIBRARY = 1
FAIL_ON_WARNINGS = 1
EXPORTS = \
GLDefs.h \

View File

@ -17,6 +17,7 @@ EXPORT_LIBRARY = 1
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
IS_COMPONENT = 1
FAIL_ON_WARNINGS = 1
XPIDLSRCS = \
nsIFontEnumerator.idl \

View File

@ -56,17 +56,6 @@ gfxAndroidPlatform::CreateOffscreenSurface(const gfxIntSize& size,
return newSurface.forget();
}
mozilla::gfx::SurfaceFormat
gfxAndroidPlatform::Optimal2DFormatForContent(gfxASurface::gfxContentType aContent)
{
// On Android we always use RGB565 for now.
if (aContent == gfxASurface::CONTENT_COLOR) {
return mozilla::gfx::FORMAT_R5G6B5;
} else {
return gfxPlatform::Optimal2DFormatForContent(aContent);
}
}
nsresult
gfxAndroidPlatform::GetFontList(nsIAtom *aLangGroup,
const nsACString& aGenericFamily,

View File

@ -35,8 +35,6 @@ public:
virtual bool SupportsAzure(mozilla::gfx::BackendType& aBackend) { aBackend = mozilla::gfx::BACKEND_SKIA; return true; }
virtual mozilla::gfx::SurfaceFormat Optimal2DFormatForContent(gfxASurface::gfxContentType aContent);
virtual gfxImageFormat GetOffscreenFormat() { return mOffscreenFormat; }
mozilla::RefPtr<mozilla::gfx::ScaledFont>

View File

@ -1441,7 +1441,17 @@ gfxPlatform::Optimal2DFormatForContent(gfxASurface::gfxContentType aContent)
{
switch (aContent) {
case gfxASurface::CONTENT_COLOR:
return mozilla::gfx::FORMAT_B8G8R8X8;
switch (GetOffscreenFormat()) {
case gfxASurface::ImageFormatARGB32:
return mozilla::gfx::FORMAT_B8G8R8A8;
case gfxASurface::ImageFormatRGB24:
return mozilla::gfx::FORMAT_B8G8R8X8;
case gfxASurface::ImageFormatRGB16_565:
return mozilla::gfx::FORMAT_R5G6B5;
default:
NS_NOTREACHED("unknown gfxImageFormat for CONTENT_COLOR");
return mozilla::gfx::FORMAT_B8G8R8A8;
}
case gfxASurface::CONTENT_ALPHA:
return mozilla::gfx::FORMAT_A8;
case gfxASurface::CONTENT_COLOR_ALPHA:

View File

@ -139,7 +139,7 @@ foreach $ac_file (@makefiles) {
}
open (INFILE, "<$ac_file_in")
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
or ( die "can't read $ac_file_in: No such file or directory\n");
open (OUTFILE, ">$ac_file")
or ( warn "Unable to create $ac_file\n" and next);

View File

@ -125,7 +125,6 @@ MOZ_ARG_DISABLE_BOOL(compile-environment,
[ --disable-compile-environment
Disable compiler/library checks.],
COMPILE_ENVIRONMENT= )
AC_SUBST(COMPILE_ENVIRONMENT)
dnl Check for Perl first -- needed for win32 SDK checks
MOZ_PATH_PROGS(PERL, $PERL perl5 perl )
@ -574,72 +573,6 @@ EOF
fi
unset _MSVC_VER_FILTER
AC_CACHE_CHECK(for std::_Throw, ac_cv_have_std__Throw,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
AC_TRY_COMPILE([#include <exception>],
[std::_Throw(std::exception()); return 0;],
ac_cv_have_std__Throw="yes",
ac_cv_have_std__Throw="no")
CXXFLAGS="$_SAVE_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$ac_cv_have_std__Throw" == "yes"; then
AC_CACHE_CHECK(for |class __declspec(dllimport) exception| bug,
ac_cv_have_dllimport_exception_bug,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
AC_TRY_LINK([#include <vector>],
[std::vector<int> v; return v.at(1);],
ac_cv_have_dllimport_exception_bug="no",
ac_cv_have_dllimport_exception_bug="yes")
CXXFLAGS="$_SAVE_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$ac_cv_have_dllimport_exception_bug" = "no"; then
WRAP_STL_INCLUDES=1
MOZ_MSVC_STL_WRAP__Throw=1
AC_DEFINE(MOZ_MSVC_STL_WRAP__Throw)
fi
else
AC_CACHE_CHECK(for overridable _RAISE,
ac_cv_have__RAISE,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
_SAVE_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
AC_TRY_COMPILE([#include <xstddef>
#undef _RAISE
#define _RAISE(x) externallyDefinedFunction((x).what())
#include <vector>
],
[std::vector<int> v; return v.at(1);],
ac_cv_have__RAISE="no",
ac_cv_have__RAISE="yes")
CXXFLAGS="$_SAVE_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$ac_cv_have__RAISE" = "yes"; then
WRAP_STL_INCLUDES=1
MOZ_MSVC_STL_WRAP__RAISE=1
AC_DEFINE(MOZ_MSVC_STL_WRAP__RAISE)
else
AC_MSG_ERROR([Gecko exception wrapping doesn't understand your your MSVC/SDK. Please file a bug describing this error and your build configuration.])
fi
fi
if test "$WRAP_STL_INCLUDES" = "1"; then
STL_FLAGS='-D_HAS_EXCEPTIONS=0 -I$(DIST)/stl_wrappers'
fi
else
# Check w32api version
_W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
@ -756,11 +689,6 @@ AC_SUBST(GNU_CXX)
AC_SUBST(INTEL_CC)
AC_SUBST(INTEL_CXX)
AC_SUBST(STL_FLAGS)
AC_SUBST(WRAP_STL_INCLUDES)
AC_SUBST(MOZ_MSVC_STL_WRAP__Throw)
AC_SUBST(MOZ_MSVC_STL_WRAP__RAISE)
dnl ========================================================
dnl Checks for programs.
dnl ========================================================
@ -967,7 +895,6 @@ esac
if test "$GMAKE" = ":"; then
AC_MSG_ERROR([GNU make not found])
fi
AC_SUBST(GMAKE)
# MAKE will be set by client.mk, but still need this for standalone js builds
if test -z "$MAKE"; then
@ -1310,10 +1237,7 @@ MOZ_ARG_ENABLE_BOOL(llvm-hacks,
MOZ_LLVM_HACKS= )
if test -n "$MOZ_LLVM_HACKS"; then
MOZ_NO_WLZDEFS=1
MOZ_CFLAGS_NSS=1
fi
AC_SUBST(MOZ_NO_WLZDEFS)
AC_SUBST(MOZ_CFLAGS_NSS)
dnl ========================================================
dnl GNU specific defaults
@ -1615,7 +1539,6 @@ dnl ========================================================
AC_MSG_CHECKING(for custom <stdint.h> implementation)
if test "$MOZ_CUSTOM_STDINT_H"; then
AC_DEFINE_UNQUOTED(MOZ_CUSTOM_STDINT_H, "$MOZ_CUSTOM_STDINT_H")
AC_SUBST(MOZ_CUSTOM_STDINT_H)
AC_MSG_RESULT(using $MOZ_CUSTOM_STDINT_H)
else
AC_MSG_RESULT(none specified)
@ -2638,8 +2561,6 @@ EOF
"$ac_cv_have_visibility_class_bug" = "no"; then
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
WRAP_SYSTEM_INCLUDES=1
STL_FLAGS='-I$(DIST)/stl_wrappers'
WRAP_STL_INCLUDES=1
else
VISIBILITY_FLAGS='-fvisibility=hidden'
fi # have visibility pragma bug
@ -2658,26 +2579,6 @@ AC_SUBST(VISIBILITY_FLAGS)
MOZ_GCC_PR49911
dnl Check for __force_align_arg_pointer__ for SSE2 on gcc
dnl ========================================================
if test "$GNU_CC"; then
CFLAGS_save="${CFLAGS}"
CFLAGS="${CFLAGS} -Werror"
AC_CACHE_CHECK(for __force_align_arg_pointer__ attribute,
ac_cv_force_align_arg_pointer,
[AC_TRY_COMPILE([__attribute__ ((__force_align_arg_pointer__)) void test() {}],
[],
ac_cv_force_align_arg_pointer="yes",
ac_cv_force_align_arg_pointer="no")])
CFLAGS="${CFLAGS_save}"
if test "$ac_cv_force_align_arg_pointer" = "yes"; then
HAVE_GCC_ALIGN_ARG_POINTER=1
else
HAVE_GCC_ALIGN_ARG_POINTER=
fi
fi
AC_SUBST(HAVE_GCC_ALIGN_ARG_POINTER)
dnl Checks for header files.
dnl ========================================================
AC_HEADER_DIRENT
@ -3016,64 +2917,6 @@ AC_CACHE_CHECK(
if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then
AC_DEFINE(HAVE_GNU_GET_LIBC_VERSION)
fi
case $target_os in
darwin*|mingw*|os2*)
;;
*)
AC_CHECK_LIB(c, iconv, [_ICONV_LIBS="$_ICONV_LIBS"],
AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"],
AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"])))
_SAVE_LIBS=$LIBS
LIBS="$LIBS $_ICONV_LIBS"
AC_CACHE_CHECK(
[for iconv()],
ac_cv_func_iconv,
[AC_TRY_LINK([
#include <stdlib.h>
#include <iconv.h>
],
[
iconv_t h = iconv_open("", "");
iconv(h, NULL, NULL, NULL, NULL);
iconv_close(h);
],
[ac_cv_func_iconv=yes],
[ac_cv_func_iconv=no]
)]
)
if test "$ac_cv_func_iconv" = "yes"; then
AC_DEFINE(HAVE_ICONV)
DYNAMIC_XPCOM_LIBS="$DYNAMIC_XPCOM_LIBS $_ICONV_LIBS"
LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
LIBICONV="$_ICONV_LIBS"
AC_CACHE_CHECK(
[for iconv() with const input],
ac_cv_func_const_iconv,
[AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
],
[
const char *input = "testing";
iconv_t h = iconv_open("", "");
iconv(h, &input, NULL, NULL, NULL);
iconv_close(h);
],
[ac_cv_func_const_iconv=yes],
[ac_cv_func_const_iconv=no]
)]
)
if test "$ac_cv_func_const_iconv" = "yes"; then
AC_DEFINE(HAVE_ICONV_WITH_CONST_INPUT)
fi
fi
LIBS=$_SAVE_LIBS
;;
esac
AC_LANG_C
dnl **********************
@ -4483,7 +4326,6 @@ AC_SUBST(IMPLIB)
AC_SUBST(FILTER)
AC_SUBST(BIN_FLAGS)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)
AC_SUBST(MOZ_DEBUG)
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
@ -4497,7 +4339,6 @@ AC_SUBST(MOZ_CALLGRIND)
AC_SUBST(MOZ_VTUNE)
AC_SUBST(MOZ_ETW)
AC_SUBST(MOZ_PROFILING)
AC_SUBST(MOZ_QUANTIFY)
AC_SUBST(LIBICONV)
AC_SUBST(ENABLE_TESTS)
@ -4818,6 +4659,10 @@ dnl
dnl This does not change the $MAKEFILES variable.
dnl
echo $MAKEFILES | ${PERL} $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
res="$?"
if test "$res" != 0; then
exit $res
fi
. ./conftest.sh
rm conftest.sh

View File

@ -5778,8 +5778,8 @@ Parser::memberExpr(JSBool allowCallSyntax)
name = atom->asPropertyName();
}
} else if (propExpr->isKind(PNK_NUMBER)) {
JSAtom *atom;
if (!js_ValueToAtom(context, NumberValue(propExpr->pn_dval), &atom))
JSAtom *atom = ToAtom(context, NumberValue(propExpr->pn_dval));
if (!atom)
return NULL;
if (!atom->isIndex(&index))
name = atom->asPropertyName();
@ -6789,7 +6789,8 @@ Parser::primaryExpr(TokenKind tt, bool afterDoubleDot)
if (!pn3)
return NULL;
pn3->pn_dval = tokenStream.currentToken().number();
if (!js_ValueToAtom(context, DoubleValue(pn3->pn_dval), &atom))
atom = ToAtom(context, DoubleValue(pn3->pn_dval));
if (!atom)
return NULL;
break;
case TOK_NAME:
@ -6822,7 +6823,8 @@ Parser::primaryExpr(TokenKind tt, bool afterDoubleDot)
if (!pn3)
return NULL;
pn3->pn_dval = index;
if (!js_ValueToAtom(context, DoubleValue(pn3->pn_dval), &atom))
atom = ToAtom(context, DoubleValue(pn3->pn_dval));
if (!atom)
return NULL;
} else {
pn3 = NameNode::create(PNK_STRING, atom, this, this->tc->sc);
@ -6834,7 +6836,8 @@ Parser::primaryExpr(TokenKind tt, bool afterDoubleDot)
if (!pn3)
return NULL;
pn3->pn_dval = tokenStream.currentToken().number();
if (!js_ValueToAtom(context, DoubleValue(pn3->pn_dval), &atom))
atom = ToAtom(context, DoubleValue(pn3->pn_dval));
if (!atom)
return NULL;
} else {
tokenStream.ungetToken();

View File

@ -837,8 +837,8 @@ array_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleI
if (ValueIsSpecial(obj, &idval, &sid, cx))
return array_getSpecial(cx, obj, receiver, Rooted<SpecialId>(cx, sid), vp);
JSAtom *atom;
if (!js_ValueToAtom(cx, idval, &atom))
JSAtom *atom = ToAtom(cx, idval);
if (!atom)
return false;
if (atom->isIndex(&index))
@ -2279,7 +2279,7 @@ js::array_sort(JSContext *cx, unsigned argc, Value *vp)
if (!strElements.reserve(2 * n))
return false;
int cursor = 0;
size_t cursor = 0;
for (size_t i = 0; i < n; i++) {
if (!JS_CHECK_OPERATION_LIMIT(cx))
return false;

View File

@ -522,8 +522,8 @@ InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval,
}
#endif
JSAtom *atom;
if (!js_ValueToAtom(cx, idval, &atom))
JSAtom *atom = ToAtom(cx, idval);
if (!atom)
return false;
*idp = AtomToId(atom);

View File

@ -410,11 +410,11 @@ js_DumpAtoms(JSContext *cx, FILE *fp);
#endif
inline bool
js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp);
namespace js {
inline JSAtom *
ToAtom(JSContext *cx, const js::Value &v);
bool
InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval,
jsid *idp, Value *vp);

View File

@ -24,30 +24,27 @@ js::AtomStateEntry::asPtr() const
return atom;
}
inline bool
js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp)
namespace js {
inline JSAtom *
ToAtom(JSContext *cx, const js::Value &v)
{
if (!v.isString()) {
JSString *str = js::ToStringSlow(cx, v);
if (!str)
return false;
return NULL;
JS::Anchor<JSString *> anchor(str);
*atomp = js_AtomizeString(cx, str);
return !!*atomp;
return js_AtomizeString(cx, str);
}
JSString *str = v.toString();
if (str->isAtom()) {
*atomp = &str->asAtom();
return true;
}
if (str->isAtom())
return &str->asAtom();
*atomp = js_AtomizeString(cx, str);
return !!*atomp;
JS::Anchor<JSString *> anchor(str);
return js_AtomizeString(cx, str);
}
namespace js {
inline bool
ValueToId(JSContext* cx, JSObject *obj, const Value &v, jsid *idp)
{

View File

@ -635,8 +635,8 @@ GetObjectElementOperation(JSContext *cx, JSOp op, HandleObject obj, const Value
if (!obj->getSpecial(cx, obj, special, res))
return false;
} else {
JSAtom *name;
if (!js_ValueToAtom(cx, *res, &name))
JSAtom *name = ToAtom(cx, *res);
if (!name)
return false;
if (name->isIndex(&index)) {

View File

@ -3179,8 +3179,8 @@ JSObject::deleteByValue(JSContext *cx, const Value &property, Value *rval, bool
RootedObject self(cx, this);
JSAtom *name;
if (!js_ValueToAtom(cx, propval, &name))
JSAtom *name = ToAtom(cx, propval);
if (!name)
return false;
if (name->isIndex(&index))

View File

@ -1849,6 +1849,8 @@ GetLocal(SprintStack *ss, int i)
static bool
IsVarSlot(JSPrinter *jp, jsbytecode *pc, JSAtom **varAtom, int *localSlot)
{
*localSlot = -1;
if (JOF_OPTYPE(*pc) == JOF_SCOPECOORD) {
*varAtom = ScopeCoordinateName(jp->sprinter.context->runtime, jp->script, pc);
LOCAL_ASSERT_RV(*varAtom, false);

View File

@ -1137,7 +1137,7 @@ JSScript::Create(JSContext *cx, bool savedCallerFun, JSPrincipals *principals,
// never trigger. Oh well.
if (staticLevel > UINT16_MAX) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_TOO_DEEP, js_function_str);
return false;
return NULL;
}
script->staticLevel = uint16_t(staticLevel);

View File

@ -1110,8 +1110,8 @@ class TypedArrayTemplate
if (ValueIsSpecial(obj, &idval, &sid, cx))
return obj_getSpecial(cx, obj, receiver, Rooted<SpecialId>(cx, sid), vp);
JSAtom *atom;
if (!js_ValueToAtom(cx, idval, &atom))
JSAtom *atom = ToAtom(cx, idval);
if (!atom)
return false;
if (atom->isIndex(&index))

View File

@ -761,7 +761,8 @@ QNameHelper(JSContext *cx, int argc, jsval *argv, jsval *rval)
} else if (argc < 0) {
name = cx->runtime->atomState.typeAtoms[JSTYPE_VOID];
} else {
if (!js_ValueToAtom(cx, nameval, &name))
name = ToAtom(cx, nameval);
if (!name)
return false;
}
@ -2828,7 +2829,8 @@ ToAttributeName(JSContext *cx, jsval v)
JSAtom *name;
if (JSVAL_IS_STRING(v)) {
if (!js_ValueToAtom(cx, v, &name))
name = ToAtom(cx, v);
if (!name)
return NULL;
uri = prefix = cx->runtime->emptyString;
} else {
@ -2852,7 +2854,8 @@ ToAttributeName(JSContext *cx, jsval v)
if (clasp == &AnyNameClass) {
name = cx->runtime->atomState.starAtom;
} else {
if (!js_ValueToAtom(cx, v, &name))
name = ToAtom(cx, v);
if (!name)
return NULL;
}
uri = prefix = cx->runtime->emptyString;
@ -6705,7 +6708,8 @@ xml_setLocalName(JSContext *cx, unsigned argc, jsval *vp)
if (!JSVAL_IS_PRIMITIVE(name) && JSVAL_TO_OBJECT(name)->isQName()) {
namestr = JSVAL_TO_OBJECT(name)->getQNameLocalName();
} else {
if (!js_ValueToAtom(cx, name, &namestr))
namestr = ToAtom(cx, name);
if (!namestr)
return false;
}
}

View File

@ -408,9 +408,9 @@ JSFlatString::isIndexSlow(uint32_t *indexp) const
* This is used when we generate our table of short strings, so the compiler is
* happier if we use |c| as few times as possible.
*/
#define FROM_SMALL_CHAR(c) ((c) + ((c) < 10 ? '0' : \
(c) < 36 ? 'a' - 10 : \
'A' - 36))
#define FROM_SMALL_CHAR(c) jschar((c) + ((c) < 10 ? '0' : \
(c) < 36 ? 'a' - 10 : \
'A' - 36))
/*
* Declare length-2 strings. We only store strings where both characters are
@ -432,7 +432,7 @@ StaticStrings::init(JSContext *cx)
SwitchToCompartment sc(cx, cx->runtime->atomsCompartment);
for (uint32_t i = 0; i < UNIT_STATIC_LIMIT; i++) {
jschar buffer[] = { i, 0x00 };
jschar buffer[] = { jschar(i), '\0' };
JSFixedString *s = js_NewStringCopyN(cx, buffer, 1);
if (!s)
return false;
@ -440,7 +440,7 @@ StaticStrings::init(JSContext *cx)
}
for (uint32_t i = 0; i < NUM_SMALL_CHARS * NUM_SMALL_CHARS; i++) {
jschar buffer[] = { FROM_SMALL_CHAR(i >> 6), FROM_SMALL_CHAR(i & 0x3F), 0x00 };
jschar buffer[] = { FROM_SMALL_CHAR(i >> 6), FROM_SMALL_CHAR(i & 0x3F), '\0' };
JSFixedString *s = js_NewStringCopyN(cx, buffer, 2);
if (!s)
return false;
@ -455,7 +455,10 @@ StaticStrings::init(JSContext *cx)
TO_SMALL_CHAR((i % 10) + '0');
intStaticTable[i] = length2StaticTable[index];
} else {
jschar buffer[] = { (i / 100) + '0', ((i / 10) % 10) + '0', (i % 10) + '0', 0x00 };
jschar buffer[] = { jschar('0' + (i / 100)),
jschar('0' + ((i / 10) % 10)),
jschar('0' + (i % 10)),
'\0' };
JSFixedString *s = js_NewStringCopyN(cx, buffer, 3);
if (!s)
return false;

View File

@ -1439,3 +1439,10 @@ nsTextControlFrame::RestoreState(nsPresState* aState)
Properties().Set(ContentScrollPos(), new nsPoint(aState->GetScrollState()));
return NS_OK;
}
NS_IMETHODIMP
nsTextControlFrame::PeekOffset(nsPeekOffsetStruct *aPos)
{
return NS_ERROR_FAILURE;
}

View File

@ -155,6 +155,8 @@ public:
nsresult GetText(nsString& aText);
NS_IMETHOD PeekOffset(nsPeekOffsetStruct *aPos);
NS_DECL_QUERYFRAME
// Temp reference to scriptrunner

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<script>
function boom()
{
document.documentElement.removeChild(document.body);
var newBody = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
document.documentElement.appendChild(newBody);
newBody.contentEditable = "true";
document.execCommand("inserthtml", false, "<textarea>a</textarea>");
document.execCommand("insertimage", false, "1.jpg");
try { document.execCommand("forwardDelete", false, null); } catch(e) { }
document.execCommand("inserthtml", false, "x<span><\/span>y");
}
</script>
<body onload="boom();"></body>

View File

@ -390,3 +390,4 @@ load first-letter-638937-2.html
load 737313-1.html
load 737313-2.html
load 737313-3.html
load 762764-1.html

View File

@ -1226,6 +1226,19 @@ nsSVGUtils::PaintFrameWithEffects(nsRenderingContext *aContext,
if (opacity != 1.0f || maskFrame || (clipPathFrame && !isTrivialClip)) {
complexEffects = true;
gfx->Save();
if (!(aFrame->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
// aFrame has a valid visual overflow rect, so clip to it before calling
// PushGroup() to minimize the size of the surfaces we'll composite:
gfxContextMatrixAutoSaveRestore matrixAutoSaveRestore(gfx);
gfx->Multiply(GetCanvasTM(aFrame));
nsRect overflowRect = aFrame->GetVisualOverflowRectRelativeToSelf();
if (aFrame->IsFrameOfType(nsIFrame::eSVGGeometry)) {
// Unlike containers, leaf frames do not include GetPosition() in
// GetCanvasTM().
overflowRect = overflowRect + aFrame->GetPosition();
}
aContext->IntersectClip(overflowRect);
}
gfx->PushGroup(gfxASurface::CONTENT_COLOR_ALPHA);
}

View File

@ -37,9 +37,11 @@ NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
endif
# See bug 764192 for details on what we're investigating here.
# For non release/esr builds, enable (some) fatal jemalloc assertions. This
# helps us catch memory errors. See bug 764192 for details on what
# MOZ_TEMP_INVESTIGATION is for.
ifeq (,$(filter release esr,$(MOZ_UPDATE_CHANNEL)))
DEFINES += -DMOZ_TEMP_INVESTIGATION
DEFINES += -DMOZ_JEMALLOC_HARD_ASSERTS -DMOZ_TEMP_INVESTIGATION
endif
include $(topsrcdir)/config/rules.mk

View File

@ -935,7 +935,7 @@ typedef rb_tree(arena_chunk_t) arena_chunk_tree_t;
typedef struct arena_run_s arena_run_t;
struct arena_run_s {
#if defined(MALLOC_DEBUG) || defined(MOZ_TEMP_INVESTIGATION)
#if defined(MALLOC_DEBUG) || defined(MOZ_JEMALLOC_HARD_ASSERTS)
uint32_t magic;
# define ARENA_RUN_MAGIC 0x384adf93
#endif
@ -991,7 +991,7 @@ struct arena_bin_s {
};
struct arena_s {
#if defined(MALLOC_DEBUG) || defined(MOZ_TEMP_INVESTIGATION)
#if defined(MALLOC_DEBUG) || defined(MOZ_JEMALLOC_HARD_ASSERTS)
uint32_t magic;
# define ARENA_MAGIC 0x947d3d24
#endif
@ -1552,12 +1552,9 @@ void (*_malloc_message)(const char *p1, const char *p2, const char *p3,
#define assert(e)
#endif
/* See bug 764192 for details on what we're hoping to see with these
* RELEASE_ASSERTs and the other code ifdef'ed by MOZ_TEMP_INVESTIGATION. */
#include <mozilla/Assertions.h>
#if defined(MOZ_TEMP_INVESTIGATION)
#if defined(MOZ_JEMALLOC_HARD_ASSERTS)
# define RELEASE_ASSERT(assertion) do { \
if (!(assertion)) { \
MOZ_CRASH(); \
@ -2478,7 +2475,7 @@ malloc_rtree_new(unsigned bits)
height = bits / bits_per_level;
if (height * bits_per_level != bits)
height++;
assert(height * bits_per_level >= bits);
RELEASE_ASSERT(height * bits_per_level >= bits);
ret = (malloc_rtree_t*)base_calloc(1, sizeof(malloc_rtree_t) +
(sizeof(unsigned) * (height - 1)));
@ -2988,7 +2985,7 @@ choose_arena(void)
if (ret == NULL) {
ret = choose_arena_hard();
assert(ret != NULL);
RELEASE_ASSERT(ret != NULL);
}
#else
if (isthreaded && narenas > 1) {
@ -3034,7 +3031,7 @@ choose_arena(void)
ret = arenas[0];
#endif
assert(ret != NULL);
RELEASE_ASSERT(ret != NULL);
return (ret);
}
@ -3600,7 +3597,7 @@ arena_purge(arena_t *arena)
} rb_foreach_end(arena_chunk_t, link_dirty, &arena->chunks_dirty, chunk)
assert(ndirty == arena->ndirty);
#endif
assert(arena->ndirty > opt_dirty_max);
RELEASE_ASSERT(arena->ndirty > opt_dirty_max);
#ifdef MALLOC_STATS
arena->stats.npurge++;
@ -3617,10 +3614,10 @@ arena_purge(arena_t *arena)
bool madvised = false;
#endif
chunk = arena_chunk_tree_dirty_last(&arena->chunks_dirty);
assert(chunk != NULL);
RELEASE_ASSERT(chunk != NULL);
for (i = chunk_npages - 1; chunk->ndirty > 0; i--) {
assert(i >= arena_chunk_header_npages);
RELEASE_ASSERT(i >= arena_chunk_header_npages);
if (chunk->map[i].bits & CHUNK_MAP_DIRTY) {
#ifdef MALLOC_DECOMMIT
@ -3891,7 +3888,7 @@ arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin)
run->regs_minelm = 0;
run->nfree = bin->nregs;
#if defined(MALLOC_DEBUG) || defined(MOZ_TEMP_INVESTIGATION)
#if defined(MALLOC_DEBUG) || defined(MOZ_JEMALLOC_HARD_ASSERTS)
run->magic = ARENA_RUN_MAGIC;
#endif
@ -4396,14 +4393,14 @@ arena_salloc(const void *ptr)
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
pageind = (((uintptr_t)ptr - (uintptr_t)chunk) >> pagesize_2pow);
mapbits = chunk->map[pageind].bits;
assert((mapbits & CHUNK_MAP_ALLOCATED) != 0);
RELEASE_ASSERT((mapbits & CHUNK_MAP_ALLOCATED) != 0);
if ((mapbits & CHUNK_MAP_LARGE) == 0) {
arena_run_t *run = (arena_run_t *)(mapbits & ~pagesize_mask);
assert(run->magic == ARENA_RUN_MAGIC);
RELEASE_ASSERT(run->magic == ARENA_RUN_MAGIC);
ret = run->bin->reg_size;
} else {
ret = mapbits & ~pagesize_mask;
assert(ret != 0);
RELEASE_ASSERT(ret != 0);
}
return (ret);
@ -4431,7 +4428,7 @@ isalloc_validate(const void *ptr)
return (0);
if (chunk != ptr) {
assert(chunk->arena->magic == ARENA_MAGIC);
RELEASE_ASSERT(chunk->arena->magic == ARENA_MAGIC);
return (arena_salloc(ptr));
} else {
size_t ret;
@ -4476,7 +4473,7 @@ isalloc(const void *ptr)
/* Extract from tree of huge allocations. */
key.addr = __DECONST(void *, ptr);
node = extent_tree_ad_search(&huge, &key);
assert(node != NULL);
RELEASE_ASSERT(node != NULL);
ret = node->size;
@ -4530,7 +4527,7 @@ arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr,
run_mapelm);
arena_run_tree_remove(&bin->runs, run_mapelm);
}
#if defined(MALLOC_DEBUG) || defined(MOZ_TEMP_INVESTIGATION)
#if defined(MALLOC_DEBUG) || defined(MOZ_JEMALLOC_HARD_ASSERTS)
run->magic = 0;
#endif
VALGRIND_FREELIKE_BLOCK(run, 0);
@ -4689,7 +4686,7 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
size_t pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> pagesize_2pow;
size_t npages = oldsize >> pagesize_2pow;
assert(oldsize == (chunk->map[pageind].bits & ~pagesize_mask));
RELEASE_ASSERT(oldsize == (chunk->map[pageind].bits & ~pagesize_mask));
/* Try to extend the run. */
assert(size > oldsize);
@ -4751,7 +4748,7 @@ arena_ralloc_large(void *ptr, size_t size, size_t oldsize)
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
arena = chunk->arena;
assert(arena->magic == ARENA_MAGIC);
RELEASE_ASSERT(arena->magic == ARENA_MAGIC);
if (psize < oldsize) {
#ifdef MALLOC_FILL
@ -4946,7 +4943,7 @@ arena_new(arena_t *arena)
#endif
}
#if defined(MALLOC_DEBUG) || defined(MOZ_TEMP_INVESTIGATION)
#if defined(MALLOC_DEBUG) || defined(MOZ_JEMALLOC_HARD_ASSERTS)
arena->magic = ARENA_MAGIC;
#endif
@ -6746,7 +6743,7 @@ hard_purge_chunk(arena_chunk_t *chunk)
npages++) {
/* Turn off the chunk's MADV_FREED bit and turn on its
* DECOMMITTED bit. */
assert(!(chunk->map[i + npages].bits & CHUNK_MAP_DECOMMITTED));
RELEASE_ASSERT(!(chunk->map[i + npages].bits & CHUNK_MAP_DECOMMITTED));
chunk->map[i + npages].bits ^= CHUNK_MAP_MADVISED_OR_DECOMMITTED;
}

View File

@ -576,7 +576,6 @@ elif [ "$MOZ_WIDGET_TOOLKIT" = "cocoa" ]; then
add_makefiles "
content/xbl/builtin/mac/Makefile
dom/plugins/ipc/interpose/Makefile
dom/system/cocoa/Makefile
image/decoders/icon/mac/Makefile
intl/locale/src/mac/Makefile
netwerk/system/mac/Makefile
@ -1127,7 +1126,6 @@ fi
if [ "$MOZ_B2G_RIL" ]; then
add_makefiles "
dom/system/b2g/Makefile
dom/telephony/Makefile
dom/wifi/Makefile
ipc/ril/Makefile

View File

@ -8,7 +8,6 @@ xulrunner/Makefile
xulrunner/app/Makefile
xulrunner/app/profile/Makefile
xulrunner/app/profile/chrome/Makefile
xulrunner/app/profile/extensions/Makefile
xulrunner/examples/Makefile
xulrunner/examples/simple/Makefile
xulrunner/examples/simple/components/Makefile
@ -25,12 +24,6 @@ if [ "$MAKENSISU" ]; then
"
fi
if [ "$OS_ARCH" = "Darwin" ]; then
add_makefiles "
xulrunner/installer/mac/Makefile
"
fi
if [ "$OS_ARCH" = "WINNT" ]; then
add_makefiles "
xulrunner/tools/redit/Makefile