author | Ehsan Akhgari <ehsan@mozilla.com> |
Fri, 02 Sep 2011 09:03:08 -0400 | |
changeset 76435 | adda17b48d1e913a78e02ecae2d88410afeed016 |
parent 76434 | 176fae7de173d1c0d4b928fdf7ee7ef5d542dec5 |
child 76436 | 7b7a4d982a65ecfbc825b104c43fb243d455a994 |
push id | 21103 |
push user | eakhgari@mozilla.com |
push date | Fri, 02 Sep 2011 15:26:45 +0000 |
treeherder | mozilla-central@095e2524cad9 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 9.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -11,16 +11,17 @@ builtin(include, build/autoconf/pkg.m4)d builtin(include, build/autoconf/freetype2.m4)dnl builtin(include, build/autoconf/codeset.m4)dnl builtin(include, build/autoconf/altoptions.m4)dnl builtin(include, build/autoconf/mozprog.m4)dnl builtin(include, build/autoconf/mozheader.m4)dnl builtin(include, build/autoconf/acwinpaths.m4)dnl builtin(include, build/autoconf/lto.m4)dnl builtin(include, build/autoconf/gcc-pr49911.m4)dnl +builtin(include, build/autoconf/frameptr.m4)dnl MOZ_PROG_CHECKMSYS() # Read the user's .mozconfig script. We can't do this in # configure.in: autoconf puts the argument parsing code above anything # expanded from configure.in, and we need to get the configure options # from .mozconfig in place before that argument parsing code. MOZ_READ_MOZCONFIG(.)
--- a/browser/branding/nightly/pref/firefox-branding.js +++ b/browser/branding/nightly/pref/firefox-branding.js @@ -1,12 +1,13 @@ pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/"); pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/"); // The time interval between checks for a new version (in seconds) -pref("app.update.interval", 7200); // 2 hours +// nightly=8 hours, official=24 hours +pref("app.update.interval", 28800); // The time interval between the downloading of mar file chunks in the // background (in seconds) pref("app.update.download.backgroundInterval", 60); // URL user can browse to manually if for some reason all update installation // attempts fail. pref("app.update.url.manual", "http://nightly.mozilla.org/"); // A default value for the "More information about this update" link // supplied in the "An update is available" page of the update wizard.
--- a/browser/branding/unofficial/pref/firefox-branding.js +++ b/browser/branding/unofficial/pref/firefox-branding.js @@ -1,12 +1,13 @@ pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/"); pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/"); // The time interval between checks for a new version (in seconds) -pref("app.update.interval", 86400); // 24 hours +// nightly=8 hours, official=24 hours +pref("app.update.interval", 28800); // The time interval between the downloading of mar file chunks in the // background (in seconds) pref("app.update.download.backgroundInterval", 60); // URL user can browse to manually if for some reason all update installation // attempts fail. pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/"); // A default value for the "More information about this update" link // supplied in the "An update is available" page of the update wizard.
--- a/browser/locales/en-US/searchplugins/list.txt +++ b/browser/locales/en-US/searchplugins/list.txt @@ -1,6 +1,7 @@ amazondotcom bing eBay google +twitter wikipedia yahoo
new file mode 100644 --- /dev/null +++ b/browser/locales/en-US/searchplugins/twitter.xml @@ -0,0 +1,11 @@ +<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> +<ShortName>Twitter</ShortName> +<Description>Realtime Twitter Search</Description> +<InputEncoding>UTF-8</InputEncoding> +<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/v7+D/7+/j/+/v5g/v7+YP7+/mD+/v5I/v7+KP///wD///8A////AP///wD///8A////AP///wD+/v4H/v7+UPbv4pHgx47B1K9Y3tWwWN7Ur1je3sKCx+rbuKj+/v5n/v7+GP///wD///8A////AP///wD+/v4Y+fbweM2ycMe2iB7/vI0f/8STIf/KlyL/zJki/8yZIv/LmCL/0ahK5/Hp1JH+/v4Y////AP///wD///8A7OTTaquHN+CujkXPs5ZTv6N6G/+2iB7/xpUh/8yZIv/MmSL/zJki/8yZIv/Kmy738OjUi////wD///8A////AMKtfY7w6+Ef////AP///wD///8A3sqbp8iWIf/MmSL/zJki/8yZIv/MmSL/y5gi/8mePO7+/v4w////AP///wD///8A////AP///wD+/v4H/v7+V9CtWN3KmCL/zJki/8yZIv/MmSL/zJki/8yZIv/JlyH/5tSqp/7+/mD+/v4/////AP///wD///8A+PXvJtGyZdXNnS/3y5gi/8qYIv/LmCL/zJki/8yZIv/MmSL/y5gi/82iPO7LqVfe0byMmf///wD///8A/v7+D/Do1JHKmy73ypci/8KSIP+/jyD/xpQh/8uYIv/MmSL/zJki/8qYIv+/jyD/rIEd/9nKqH7///8A////APPu4TzAlSz3wZEg/7mLH/+sgR3/uZdGz7mLH//JlyH/zJki/8yZIv/GlSH/to0r9eXbxD/Vx6dg////AP7+/h/p38WhtIsq9al/HP+kfyjuybaKgf///wCzjzjlwJAg/8qYIv/JlyH/u4wf/8CkYrn///8A////AP///wDj2sRMnHUa/7meYa7Vx6dg////AP///wD///8A2MmnYK6DHf++jiD/vo4g/62CHf/k2sQ/////AP///wD///8A8OvhH/f07w////8A////AP///wD///8A////AP///wC/p3Cfpnwc/66GKvPg1LZ8////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ANXHp2DJtoqByLWKgf///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AADgPwAAwA8AAIAHAAB4BwAA+AMAAPAAAADgAQAA4AMAAMEDAADPhwAA/48AAP/nAAD//wAA//8AAA==</Image> +<SearchForm>https://twitter.com/search/</SearchForm> +<Url type="text/html" method="GET" template="https://twitter.com/search/{searchTerms}"> + <Param name="partner" value="Firefox"/> + <Param name="source" value="desktop-search"/> +</Url> +</SearchPlugin>
new file mode 100644 --- /dev/null +++ b/build/autoconf/frameptr.m4 @@ -0,0 +1,25 @@ +dnl Set MOZ_FRAMEPTR_FLAGS to the flags that should be used for enabling or +dnl disabling frame pointers in this architecture based on the configure +dnl options + +AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [ + if test "$GNU_CC"; then + MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer" + MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer" + else + case "$target" in + *-mingw*) + MOZ_ENABLE_FRAME_PTR="-Oy-" + MOZ_DISABLE_FRAME_PTR="-Oy" + ;; + esac + fi + + # if we are debugging or profiling, we want a frame pointer. + if test -z "$MOZ_OPTIMIZE" -o \ + -n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then + MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" + else + MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" + fi +])
--- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -298,16 +298,17 @@ OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @CO OS_INCLUDES = $(NSPR_CFLAGS) $(NSS_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) OS_LIBS = @LIBS@ ACDEFINES = @MOZ_DEFINES@ WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@ MOZ_OPTIMIZE = @MOZ_OPTIMIZE@ +MOZ_FRAMEPTR_FLAGS = @MOZ_FRAMEPTR_FLAGS@ MOZ_OPTIMIZE_FLAGS = @MOZ_OPTIMIZE_FLAGS@ MOZ_PGO_OPTIMIZE_FLAGS = @MOZ_PGO_OPTIMIZE_FLAGS@ MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@ MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@ MOZ_RTTI_FLAGS_ON = @_MOZ_RTTI_FLAGS_ON@ MOZ_EXCEPTIONS_FLAGS_ON = @_MOZ_EXCEPTIONS_FLAGS_ON@
--- a/config/config.mk +++ b/config/config.mk @@ -458,16 +458,19 @@ else HOST_CFLAGS += $(MOZ_OPTIMIZE_FLAGS) endif # MODULE_OPTIMIZE_FLAGS else HOST_CFLAGS += $(MOZ_OPTIMIZE_FLAGS) endif # MOZ_OPTIMIZE == 1 endif # MOZ_OPTIMIZE endif # CROSS_COMPILE +CFLAGS += $(MOZ_FRAMEPTR_FLAGS) +CXXFLAGS += $(MOZ_FRAMEPTR_FLAGS) + # Check for FAIL_ON_WARNINGS & FAIL_ON_WARNINGS_DEBUG (Shorthand for Makefiles # to request that we use the 'warnings as errors' compile flags) # NOTE: First, we clear FAIL_ON_WARNINGS[_DEBUG] if we're doing a Windows PGO # build, since WARNINGS_AS_ERRORS has been suspected of causing isuses in that # situation. (See bug 437002.) ifeq (WINNT_1,$(OS_ARCH)_$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE)) FAIL_ON_WARNINGS_DEBUG=
--- a/configure.in +++ b/configure.in @@ -2066,22 +2066,17 @@ case "$target" in MKSHLIB_UNFORCE_ALL='' ;; esac ;; *-darwin*) MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' - # If we're building with --enable-profiling, we need a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_OPTIMIZE_FLAGS="-O3 -fomit-frame-pointer" - else - MOZ_OPTIMIZE_FLAGS="-O3 -fno-omit-frame-pointer" - fi + MOZ_OPTIMIZE_FLAGS="-O3" _PEDANTIC= CFLAGS="$CFLAGS -fno-common" CXXFLAGS="$CXXFLAGS -fno-common" DLL_SUFFIX=".dylib" DSO_LDOPTS='' STRIP="$STRIP -x -S" # Check whether we're targeting OS X or iOS AC_CACHE_CHECK(for iOS target, @@ -2183,22 +2178,17 @@ ia64*-hpux*) *-android*|*-linuxandroid*) AC_DEFINE(NO_PW_GECOS) no_x=yes _PLATFORM_DEFAULT_TOOLKIT=cairo-android TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' MOZ_GFX_OPTIMIZE_MOBILE=1 - # If we're building with --enable-profiling, we need a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fomit-frame-pointer" - else - MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer" - fi + MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions" ;; *-*linux*) # Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler. # Similarly for GNU_CXX and INTEL_CXX. if test "$INTEL_CC" -o "$INTEL_CXX"; then # -Os has been broken on Intel's C/C++ compilers for quite a # while; Intel recommends against using it. @@ -2206,24 +2196,18 @@ ia64*-hpux*) MOZ_DEBUG_FLAGS="-g" elif test "$GNU_CC" -o "$GNU_CXX"; then GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'` case $GCC_VERSION in 4.1.*|4.2.*|4.5.*) # -Os is broken on gcc 4.1.x 4.2.x, 4.5.x we need to tweak it to get good results. MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" esac - # If we're building with --enable-profiling, we need a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_FRAMEPTR_FLAGS="-fomit-frame-pointer" - else - MOZ_FRAMEPTR_FLAGS="-fno-omit-frame-pointer" - fi - MOZ_PGO_OPTIMIZE_FLAGS="-O3 $MOZ_FRAMEPTR_FLAGS" - MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK $MOZ_FRAMEPTR_FLAGS" + MOZ_PGO_OPTIMIZE_FLAGS="-O3" + MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" MOZ_DEBUG_FLAGS="-g" fi TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' MOZ_MEMORY=1 case "${target_cpu}" in @@ -2310,22 +2294,17 @@ ia64*-hpux*) CXXFLAGS="$CXXFLAGS -wd4800" # disable warning "forcing value to bool" # make 'foo == bar;' error out CFLAGS="$CFLAGS -we4553" CXXFLAGS="$CXXFLAGS -we4553" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" MOZ_DEBUG_FLAGS='-Zi' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' WARNINGS_AS_ERRORS='-WX' - # If we're building with --enable-profiling, we need -Oy-, which forces a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_OPTIMIZE_FLAGS='-O1' - else - MOZ_OPTIMIZE_FLAGS='-O1 -Oy-' - fi + MOZ_OPTIMIZE_FLAGS='-O1' MOZ_FIX_LINK_PATHS= DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib' XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib' LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib' MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)' if test $_MSC_VER -ge 1400; then LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT" dnl For profile-guided optimization @@ -6892,16 +6871,18 @@ MOZ_ARG_ENABLE_STRING(optimize, if test -n "$enableval" -a "$enableval" != "yes"; then MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'` MOZ_OPTIMIZE=2 fi else MOZ_OPTIMIZE= fi ], MOZ_OPTIMIZE=1) +MOZ_SET_FRAMEPTR_FLAGS + if test "$COMPILE_ENVIRONMENT"; then if test -n "$MOZ_OPTIMIZE"; then AC_MSG_CHECKING([for valid optimization flags]) _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" AC_TRY_COMPILE([#include <stdio.h>], [printf("Hello World\n");], _results=yes, @@ -6910,16 +6891,17 @@ if test -n "$MOZ_OPTIMIZE"; then if test "$_results" = "no"; then AC_MSG_ERROR([These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS]) fi CFLAGS=$_SAVE_CFLAGS fi fi # COMPILE_ENVIRONMENT AC_SUBST(MOZ_OPTIMIZE) +AC_SUBST(MOZ_FRAMEPTR_FLAGS) AC_SUBST(MOZ_OPTIMIZE_FLAGS) AC_SUBST(MOZ_OPTIMIZE_LDFLAGS) AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK) AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS) dnl ======================================================== dnl = Enable generation of debug symbols dnl ========================================================
deleted file mode 100644 --- a/content/smil/crashtests/678847-1.svg +++ /dev/null @@ -1,3 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg"> -<animate id="a" end="a.end+6s" /> -</svg>
deleted file mode 100644 --- a/content/smil/crashtests/678938-1.svg +++ /dev/null @@ -1,11 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait"> -<script> - window.addEventListener("load", function() { - setTimeout(function() { - document.documentElement.setCurrentTime(0); - document.documentElement.removeAttribute("class"); - }, 0); - }, false); -</script> -<set id="c"/><set id="b" begin="c.begin; b.begin"/> -</svg>
--- a/content/smil/crashtests/crashtests.list +++ b/content/smil/crashtests/crashtests.list @@ -32,13 +32,11 @@ load 606101-1.svg load 608549-1.svg load 608295-1.html load 611927-1.svg load 615002-1.svg load 615872-1.svg load 650732-1.svg load 665334-1.svg load 669225-1.svg +load 670313-1.svg load 669225-2.svg -load 670313-1.svg load 678822-1.svg -load 678847-1.svg -load 678938-1.svg
--- a/content/smil/nsSMILAnimationFunction.cpp +++ b/content/smil/nsSMILAnimationFunction.cpp @@ -473,31 +473,16 @@ nsSMILAnimationFunction::InterpolateResu } // Discrete-CalcMode case // Note: If interpolation failed (isn't supported for this type), the SVG // spec says to force discrete mode. if (calcMode == CALC_DISCRETE || NS_FAILED(rv)) { double scaledSimpleProgress = ScaleSimpleProgress(simpleProgress, CALC_DISCRETE); - - // Floating-point errors can mean that, for example, a sample time of 29s in - // a 100s duration animation gives us a simple progress of 0.28999999999 - // instead of the 0.29 we'd expect. Normally this isn't a noticeable - // problem, but when we have sudden jumps in animation values (such as is - // the case here with discrete animation) we can get unexpected results. - // - // To counteract this, before we perform a floor() on the animation - // progress, we add a tiny fudge factor to push us into the correct interval - // in cases where floating-point errors might cause us to fall short. - static const double kFloatingPointFudgeFactor = 1.0e-16; - if (scaledSimpleProgress + kFloatingPointFudgeFactor <= 1.0) { - scaledSimpleProgress += kFloatingPointFudgeFactor; - } - if (IsToAnimation()) { // We don't follow SMIL 3, 12.6.4, where discrete to animations // are the same as <set> animations. Instead, we treat it as a // discrete animation with two values (the underlying value and // the to="" value), and honor keyTimes="" as well. PRUint32 index = (PRUint32)floor(scaledSimpleProgress * 2); aResult = index == 0 ? aBaseValue : aValues[0]; } else {
--- a/content/smil/nsSMILTimedElement.cpp +++ b/content/smil/nsSMILTimedElement.cpp @@ -753,20 +753,20 @@ nsSMILTimedElement::Rewind() mSeekState = mElementState == STATE_ACTIVE ? SEEK_BACKWARD_FROM_ACTIVE : SEEK_BACKWARD_FROM_INACTIVE; } NS_ABORT_IF_FALSE(mSeekState == SEEK_BACKWARD_FROM_INACTIVE || mSeekState == SEEK_BACKWARD_FROM_ACTIVE, "Rewind in the middle of a forwards seek?"); - // Putting us in the startup state will ensure we skip doing any interval - // updates + ClearIntervals(); + // ClearIntervals puts us in to the POSTACTIVE state but we're doing a full + // rewind so go back to the startup state mElementState = STATE_STARTUP; - ClearIntervals(); UnsetBeginSpec(RemoveNonDynamic); UnsetEndSpec(RemoveNonDynamic); if (mClient) { mClient->Inactivate(PR_FALSE); } @@ -779,18 +779,16 @@ nsSMILTimedElement::Rewind() if (mAnimationElement->HasAnimAttr(nsGkAtoms::end)) { nsAutoString attValue; mAnimationElement->GetAnimAttr(nsGkAtoms::end, attValue); SetEndSpec(attValue, &mAnimationElement->AsElement(), RemoveNonDynamic); } mPrevRegisteredMilestone = sMaxMilestone; RegisterMilestone(); - NS_ABORT_IF_FALSE(!mCurrentInterval, - "Current interval is set at end of rewind"); } namespace { PRBool RemoveNonDOM(nsSMILInstanceTime* aInstanceTime) { return !aInstanceTime->FromDOM() && !aInstanceTime->ShouldPreserve(); @@ -1329,19 +1327,17 @@ nsSMILTimedElement::ClearSpecs(TimeValue aSpecs.Clear(); RemoveByFunction removeByFunction(aRemove); RemoveInstanceTimes(aInstances, removeByFunction); } void nsSMILTimedElement::ClearIntervals() { - if (mElementState != STATE_STARTUP) { - mElementState = STATE_POSTACTIVE; - } + mElementState = STATE_POSTACTIVE; mCurrentRepeatIteration = 0; ResetCurrentInterval(); // Remove old intervals for (PRInt32 i = mOldIntervals.Length() - 1; i >= 0; --i) { mOldIntervals[i]->Unlink(); } mOldIntervals.Clear(); @@ -1683,25 +1679,24 @@ nsSMILTimedElement::GetNextInterval(cons prevIntervalWasZeroDur) { tempEnd = GetNextGreater(mEndInstances, tempBegin->Time(), endPos); } // If all the ends are before the beginning we have a bad interval UNLESS: // a) We never had any end attribute to begin with (and hence we should // just use the active duration after allowing for the possibility of // an end instance provided by a DOM call), OR - // b) We have no resolved (not incl. indefinite) end instances - // (SMIL only says "if the instance list is empty"--but if we have - // indefinite/unresolved instance times then there must be a good - // reason we haven't used them (since they'll be >= tempBegin) such as - // avoiding creating a self-referential loop. In any case, the interval - // should be allowed to be open.), OR + // b) We have an end attribute but no end instances--this is a special + // case that is needed for syncbase timing so that animations of the + // following sort: <animate id="a" end="a.begin+1s" ... /> can be + // resolved (see SVGT 1.2 Test Suite animate-elem-221-t.svg) by first + // establishing an interval of unresolved duration, OR // c) We have end events which leave the interval open-ended. PRBool openEndedIntervalOk = mEndSpecs.IsEmpty() || - !HaveResolvedEndTimes() || + mEndInstances.IsEmpty() || EndHasEventConditions(); if (!tempEnd && !openEndedIntervalOk) return PR_FALSE; // Bad interval nsSMILTimeValue intervalEnd = tempEnd ? tempEnd->Time() : nsSMILTimeValue(); nsSMILTimeValue activeEnd = CalcActiveEnd(tempBegin->Time(), intervalEnd); @@ -2249,27 +2244,16 @@ const nsSMILInterval* nsSMILTimedElement::GetPreviousInterval() const { return mOldIntervals.IsEmpty() ? nsnull : mOldIntervals[mOldIntervals.Length()-1].get(); } PRBool -nsSMILTimedElement::HaveResolvedEndTimes() const -{ - if (mEndInstances.IsEmpty()) - return PR_FALSE; - - // mEndInstances is sorted so if the first time is not resolved then none of - // them are - return mEndInstances[0]->Time().IsResolved(); -} - -PRBool nsSMILTimedElement::EndHasEventConditions() const { for (PRUint32 i = 0; i < mEndSpecs.Length(); ++i) { if (mEndSpecs[i]->IsEventBased()) return PR_TRUE; } return PR_FALSE; }
--- a/content/smil/nsSMILTimedElement.h +++ b/content/smil/nsSMILTimedElement.h @@ -520,17 +520,16 @@ protected: void NotifyChangedInterval(nsSMILInterval* aInterval, PRBool aBeginObjectChanged, PRBool aEndObjectChanged); void FireTimeEventAsync(PRUint32 aMsg, PRInt32 aDetail); const nsSMILInstanceTime* GetEffectiveBeginInstance() const; const nsSMILInterval* GetPreviousInterval() const; PRBool HasPlayed() const { return !mOldIntervals.IsEmpty(); } - PRBool HaveResolvedEndTimes() const; PRBool EndHasEventConditions() const; // Reset the current interval by first passing ownership to a temporary // variable so that if Unlink() results in us receiving a callback, // mCurrentInterval will be nsnull and we will be in a consistent state. void ResetCurrentInterval() { if (mCurrentInterval) {
--- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -43,16 +43,17 @@ #include "jsprvtd.h" // we are using private JS typedefs... #include "jscntxt.h" #include "jsobj.h" #include "jsdbgapi.h" #include "WrapperFactory.h" #include "AccessCheck.h" #include "xpcprivate.h" +#include "XPCWrapper.h" #include "nscore.h" #include "nsDOMClassInfo.h" #include "nsCRT.h" #include "nsCRTGlue.h" #include "nsIServiceManager.h" #include "nsICategoryManager.h" #include "nsIComponentRegistrar.h" @@ -511,17 +512,16 @@ static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM static const char kDOMStringBundleURL[] = "chrome://global/locale/dom/dom.properties"; // NOTE: DEFAULT_SCRIPTABLE_FLAGS and DOM_DEFAULT_SCRIPTABLE_FLAGS // are defined in nsIDOMClassInfo.h. #define WINDOW_SCRIPTABLE_FLAGS \ (nsIXPCScriptable::WANT_GETPROPERTY | \ - nsIXPCScriptable::WANT_SETPROPERTY | \ nsIXPCScriptable::WANT_PRECREATE | \ nsIXPCScriptable::WANT_FINALIZE | \ nsIXPCScriptable::WANT_EQUALITY | \ nsIXPCScriptable::WANT_ENUMERATE | \ nsIXPCScriptable::DONT_ENUM_QUERY_INTERFACE | \ nsIXPCScriptable::WANT_OUTER_OBJECT) #define NODE_SCRIPTABLE_FLAGS \ @@ -5265,49 +5265,16 @@ nsWindowSH::GetProperty(nsIXPConnectWrap *vp = OBJECT_TO_JSVAL(obj); return NS_SUCCESS_I_DID_SOMETHING; } return NS_OK; } NS_IMETHODIMP -nsWindowSH::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, - JSObject *obj, jsid id, jsval *vp, PRBool *_retval) -{ - if (id == sLocation_id) { - JSAutoRequest ar(cx); - - JSString *val = ::JS_ValueToString(cx, *vp); - NS_ENSURE_TRUE(val, NS_ERROR_UNEXPECTED); - - nsCOMPtr<nsIDOMWindow> window = do_QueryWrappedNative(wrapper); - NS_ENSURE_TRUE(window, NS_ERROR_UNEXPECTED); - - nsCOMPtr<nsIDOMLocation> location; - nsresult rv = window->GetLocation(getter_AddRefs(location)); - NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && location, rv); - - nsCOMPtr<nsIXPConnectJSObjectHolder> holder; - rv = WrapNative(cx, obj, location, &NS_GET_IID(nsIDOMLocation), PR_TRUE, - vp, getter_AddRefs(holder)); - NS_ENSURE_SUCCESS(rv, rv); - - nsDependentJSString depStr; - NS_ENSURE_TRUE(depStr.init(cx, val), NS_ERROR_UNEXPECTED); - - rv = location->SetHref(depStr); - - return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING; - } - - return NS_OK; -} - -NS_IMETHODIMP nsWindowSH::Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, PRBool *_retval) { if (!ObjectIsNativeWrapper(cx, obj)) { *_retval = JS_EnumerateStandardClasses(cx, obj); } return NS_OK; @@ -6387,16 +6354,78 @@ ContentWindowGetter(JSContext *cx, uintN return ::JS_GetProperty(cx, obj, "content", vp); } static JSNewResolveOp sOtherResolveFuncs[] = { mozilla::dom::workers::ResolveWorkerClasses }; +template<class Interface> +static nsresult +LocationSetterGuts(JSContext *cx, JSObject *obj, jsval *vp) +{ + // This function duplicates some of the logic in XPC_WN_HelperSetProperty + XPCWrappedNative *wrapper = + XPCWrappedNative::GetWrappedNativeOfJSObject(cx, obj); + + // The error checks duplicate code in THROW_AND_RETURN_IF_BAD_WRAPPER + NS_ENSURE_TRUE(wrapper, NS_ERROR_XPC_BAD_OP_ON_WN_PROTO); + NS_ENSURE_TRUE(wrapper->IsValid(), NS_ERROR_XPC_HAS_BEEN_SHUTDOWN); + + nsCOMPtr<Interface> xpcomObj = do_QueryWrappedNative(wrapper); + NS_ENSURE_TRUE(xpcomObj, NS_ERROR_UNEXPECTED); + + nsCOMPtr<nsIDOMLocation> location; + nsresult rv = xpcomObj->GetLocation(getter_AddRefs(location)); + NS_ENSURE_SUCCESS(rv, rv); + + JSString *val = ::JS_ValueToString(cx, *vp); + NS_ENSURE_TRUE(val, NS_ERROR_UNEXPECTED); + + nsDependentJSString depStr; + NS_ENSURE_TRUE(depStr.init(cx, val), NS_ERROR_UNEXPECTED); + + rv = location->SetHref(depStr); + NS_ENSURE_SUCCESS(rv, rv); + + nsCOMPtr<nsIXPConnectJSObjectHolder> holder; + return WrapNative(cx, JS_GetGlobalForScopeChain(cx), location, + &NS_GET_IID(nsIDOMLocation), PR_TRUE, vp, + getter_AddRefs(holder)); +} + +template<class Interface> +static JSBool +LocationSetter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, + jsval *vp) +{ + nsresult rv = LocationSetterGuts<Interface>(cx, obj, vp); + if (NS_FAILED(rv)) { + if (!::JS_IsExceptionPending(cx)) { + nsDOMClassInfo::ThrowJSException(cx, rv); + } + return JS_FALSE; + } + + return JS_TRUE; +} + +static JSBool +LocationSetterUnwrapper(JSContext *cx, JSObject *obj, jsid id, JSBool strict, + jsval *vp) +{ + JSObject *wrapped = XPCWrapper::UnsafeUnwrapSecurityWrapper(obj); + if (wrapped) { + obj = wrapped; + } + + return LocationSetter<nsIDOMWindow>(cx, obj, id, strict, vp); +} + NS_IMETHODIMP nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, PRUint32 flags, JSObject **objp, PRBool *_retval) { nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper); if (!JSID_IS_STRING(id)) { @@ -6539,17 +6568,18 @@ nsWindowSH::NewResolve(nsIXPConnectWrapp nsCOMPtr<nsIXPConnectJSObjectHolder> holder; jsval v; rv = WrapNative(cx, scope, location, &NS_GET_IID(nsIDOMLocation), PR_TRUE, &v, getter_AddRefs(holder)); NS_ENSURE_SUCCESS(rv, rv); JSBool ok = JS_WrapValue(cx, &v) && - JS_DefinePropertyById(cx, obj, id, v, nsnull, nsnull, + JS_DefinePropertyById(cx, obj, id, v, nsnull, + LocationSetterUnwrapper, JSPROP_PERMANENT | JSPROP_ENUMERATE); if (!ok) { return NS_ERROR_FAILURE; } *objp = obj; @@ -8172,17 +8202,18 @@ nsDocumentSH::NewResolve(nsIXPConnectWra nsCOMPtr<nsIXPConnectJSObjectHolder> holder; rv = WrapNative(cx, JS_GetGlobalForScopeChain(cx), location, &NS_GET_IID(nsIDOMLocation), PR_TRUE, &v, getter_AddRefs(holder)); NS_ENSURE_SUCCESS(rv, rv); JSAutoRequest ar(cx); - JSBool ok = ::JS_DefinePropertyById(cx, obj, id, v, nsnull, nsnull, + JSBool ok = ::JS_DefinePropertyById(cx, obj, id, v, nsnull, + LocationSetter<nsIDOMDocument>, JSPROP_PERMANENT | JSPROP_ENUMERATE); if (!ok) { return NS_ERROR_FAILURE; } *objp = obj; @@ -8217,44 +8248,16 @@ nsDocumentSH::GetProperty(nsIXPConnectWr return nsNodeSH::GetProperty(wrapper, cx, obj, id, vp, _retval); } NS_IMETHODIMP nsDocumentSH::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, jsval *vp, PRBool *_retval) { - if (id == sLocation_id) { - nsCOMPtr<nsIDOMDocument> doc = do_QueryWrappedNative(wrapper); - NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED); - - nsCOMPtr<nsIDOMLocation> location; - nsresult rv = doc->GetLocation(getter_AddRefs(location)); - NS_ENSURE_SUCCESS(rv, rv); - - if (location) { - JSAutoRequest ar(cx); - - JSString *val = ::JS_ValueToString(cx, *vp); - NS_ENSURE_TRUE(val, NS_ERROR_UNEXPECTED); - - nsDependentJSString depStr; - NS_ENSURE_TRUE(depStr.init(cx, val), NS_ERROR_UNEXPECTED); - - rv = location->SetHref(depStr); - NS_ENSURE_SUCCESS(rv, rv); - - nsCOMPtr<nsIXPConnectJSObjectHolder> holder; - rv = WrapNative(cx, JS_GetGlobalForScopeChain(cx), location, - &NS_GET_IID(nsIDOMLocation), PR_TRUE, vp, - getter_AddRefs(holder)); - return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING; - } - } - if (id == sDocumentURIObject_id && IsPrivilegedScript()) { // We don't want privileged script that can read this property to set it, // but _do_ want to allow everyone else to set a value they can then read. // // XXXbz Is there a better error we could use here? return NS_ERROR_DOM_NOT_SUPPORTED_ERR; }
--- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -402,18 +402,16 @@ public: *aFlags = flags | nsIXPCScriptable::WANT_POSTCREATE; } return rv; } #endif NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, jsval *vp, PRBool *_retval); - NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, - JSObject *obj, jsid id, jsval *vp, PRBool *_retval); NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, PRBool *_retval); NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, PRUint32 flags, JSObject **objp, PRBool *_retval); NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj); NS_IMETHOD Equality(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
--- a/dom/tests/mochitest/dom-level0/Makefile.in +++ b/dom/tests/mochitest/dom-level0/Makefile.in @@ -50,12 +50,13 @@ include $(topsrcdir)/config/rules.mk test_setting_document.domain_to_shortened_ipaddr.html \ child_ip_address.html \ test_setting_document.domain_idn.html \ idn_child.html \ file_location.html \ test_location.html \ test_innerWidthHeight_script.html \ innerWidthHeight_script.html \ + test_location_setters.html \ $(NULL) libs:: $(_TEST_FILES) $(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
new file mode 100644 --- /dev/null +++ b/dom/tests/mochitest/dom-level0/test_location_setters.html @@ -0,0 +1,78 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=639720 +--> +<head> + <title>Test for Bug 639720</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=639720">Mozilla Bug 639720</a> +<p id="display"> + <iframe id="f"></iframe> +</p> +<div id="content" style="display: none"> + +</div> +<pre id="test"> +<script type="application/javascript"> + +/** Test for Bug 639720 **/ +SimpleTest.waitForExplicitFinish(); + +var tests = [ + { url: "data:text/plain,1" }, + { url: "data:text/plain,2", + useDocument: true }, + { prepURL: "http://www.example.com", + url: "data:text/plain,3" } +]; + +var currentTest = 0; + +function checkTest() { + is($("f").contentWindow.location.href, tests[currentTest].url, + "href of content window's location should match url of current test"); + ++currentTest; + runNextTest(); +} + +function runCurrentTest() { + var test = tests[currentTest]; + $("f").onload = checkTest; + if (test.useDocument) { + $("f").contentDocument.location = test.url; + } else { + $("f").contentWindow.location = test.url; + } + is(typeof($("f").contentWindow.location), "object", + "Location should not have become string"); +} + +function prepComplete() { + runCurrentTest(); +} + +function runNextTest() { + if (currentTest == tests.length) { + SimpleTest.finish(); + return; + } + + var test = tests[currentTest]; + if ("prepURL" in test) { + $("f").onload = prepComplete; + $("f").src = test.prepURL; + return; + } + + runCurrentTest(); +} + +addLoadEvent(runNextTest); +</script> +</pre> +</body> +</html>
--- a/editor/composer/src/nsEditorSpellCheck.cpp +++ b/editor/composer/src/nsEditorSpellCheck.cpp @@ -724,18 +724,19 @@ nsEditorSpellCheck::UpdateCurrentDiction } // Then, try to use language computed from element if (!mPreferredLang.IsEmpty()) { dictName.Assign(mPreferredLang); } // otherwise, get language from preferences + nsAutoString preferedDict(Preferences::GetLocalizedString("spellchecker.dictionary")); if (dictName.IsEmpty()) { - dictName.Assign(Preferences::GetLocalizedString("spellchecker.dictionary")); + dictName.Assign(preferedDict); } if (dictName.IsEmpty()) { // Prefs didn't give us a dictionary name, so just get the current // locale and use that as the default dictionary name! nsCOMPtr<nsIXULChromeRegistry> packageRegistry = @@ -750,37 +751,60 @@ nsEditorSpellCheck::UpdateCurrentDiction } SetCurrentDictionary(EmptyString()); if (NS_SUCCEEDED(rv) && !dictName.IsEmpty()) { rv = SetCurrentDictionary(dictName); if (NS_FAILED(rv)) { // required dictionary was not available. Try to get a dictionary - // matching at least language part of dictName: If required dictionary is - // "aa-bb", we try "aa", then we try any available dictionary aa-XX + // matching at least language part of dictName: + nsAutoString langCode; PRInt32 dashIdx = dictName.FindChar('-'); if (dashIdx != -1) { langCode.Assign(Substring(dictName, 0, dashIdx)); - // try to use langCode - rv = SetCurrentDictionary(langCode); } else { langCode.Assign(dictName); } + + nsDefaultStringComparator comparator; + + // try dictionary.spellchecker preference if it starts with langCode (and + // if we haven't tried it already) + if (!preferedDict.IsEmpty() && !dictName.Equals(preferedDict) && + nsStyleUtil::DashMatchCompare(preferedDict, langCode, comparator)) { + rv = SetCurrentDictionary(preferedDict); + } + + // Otherwise, try langCode (if we haven't tried it already) + if (NS_FAILED(rv)) { + if (!dictName.Equals(langCode) && !preferedDict.Equals(langCode)) { + rv = SetCurrentDictionary(preferedDict); + } + } + + // Otherwise, try any available dictionary aa-XX if (NS_FAILED(rv)) { // loop over avaible dictionaries; if we find one with required // language, use it nsTArray<nsString> dictList; rv = mSpellChecker->GetDictionaryList(&dictList); NS_ENSURE_SUCCESS(rv, rv); - nsDefaultStringComparator comparator; PRInt32 i, count = dictList.Length(); for (i = 0; i < count; i++) { nsAutoString dictStr(dictList.ElementAt(i)); + + if (dictStr.Equals(dictName) || + dictStr.Equals(preferedDict) || + dictStr.Equals(langCode)) { + // We have already tried it + continue; + } + if (nsStyleUtil::DashMatchCompare(dictStr, langCode, comparator) && NS_SUCCEEDED(SetCurrentDictionary(dictStr))) { break; } } } } }
--- a/gfx/cairo/README +++ b/gfx/cairo/README @@ -167,18 +167,16 @@ fix-cairo-win32-print-gdi-error.diff: Do pixman-image-transform.patch: Reset the transform on pixman images when using them as destinations. fix-cairo-surface-wrapper-flush-build-warning.patch: Ensures that _cairo_surface_wrapper_flush always returns a status, to silence the build warning fixup-unbounded.patch: Hack to work around bad assumption. quartz-get-image-performance: Make cairo_quartz_get_image faster in the failure case by not flushing unless we are going to succeed. -lround-c99-only.patch: Only use lround in C99 programs. - ==== pixman patches ==== pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv. pixman-rename-and-endian.patch: include cairo-platform.h for renaming of external symbols and endian macros NOTE: we previously supported ARM assembler on MSVC, this has been removed because of the maintenance burden
--- a/gfx/cairo/cairo/src/cairo-misc.c +++ b/gfx/cairo/cairo/src/cairo-misc.c @@ -478,17 +478,17 @@ uint32_t case CAIRO_OPERATOR_IN: case CAIRO_OPERATOR_DEST_IN: case CAIRO_OPERATOR_DEST_ATOP: return 0; } } -#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L +#if DISABLE_SOME_FLOATING_POINT /* This function is identical to the C99 function lround(), except that it * performs arithmetic rounding (floor(d + .5) instead of away-from-zero rounding) and * has a valid input range of (INT_MIN, INT_MAX] instead of * [INT_MIN, INT_MAX]. It is much faster on both x86 and FPU-less systems * than other commonly used methods for rounding (lround, round, rint, lrint * or float (d + 0.5)). * * The reason why this function is much faster on x86 than other
--- a/gfx/cairo/cairo/src/cairoint.h +++ b/gfx/cairo/cairo/src/cairoint.h @@ -969,17 +969,17 @@ static inline double cairo_const * away from 0. _cairo_round rounds halfway cases toward negative infinity. * This matches the rounding behaviour of _cairo_lround. */ static inline double cairo_const _cairo_round (double r) { return floor (r + .5); } -#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L +#if DISABLE_SOME_FLOATING_POINT cairo_private int _cairo_lround (double d) cairo_const; #else #define _cairo_lround lround #endif cairo_private uint16_t _cairo_half_from_float (float f) cairo_const;
deleted file mode 100644 --- a/gfx/cairo/lround-c99-only.patch +++ /dev/null @@ -1,46 +0,0 @@ -Only use lround in C99 programs. - -diff --git a/gfx/cairo/cairo/src/cairo-misc.c b/gfx/cairo/cairo/src/cairo-misc.c ---- a/gfx/cairo/cairo/src/cairo-misc.c -+++ b/gfx/cairo/cairo/src/cairo-misc.c -@@ -478,17 +478,17 @@ _cairo_operator_bounded_by_either (cairo - case CAIRO_OPERATOR_IN: - case CAIRO_OPERATOR_DEST_IN: - case CAIRO_OPERATOR_DEST_ATOP: - return 0; - } - - } - --#if DISABLE_SOME_FLOATING_POINT -+#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L - /* This function is identical to the C99 function lround(), except that it - * performs arithmetic rounding (floor(d + .5) instead of away-from-zero rounding) and - * has a valid input range of (INT_MIN, INT_MAX] instead of - * [INT_MIN, INT_MAX]. It is much faster on both x86 and FPU-less systems - * than other commonly used methods for rounding (lround, round, rint, lrint - * or float (d + 0.5)). - * - * The reason why this function is much faster on x86 than other -diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h ---- a/gfx/cairo/cairo/src/cairoint.h -+++ b/gfx/cairo/cairo/src/cairoint.h -@@ -969,17 +969,17 @@ _cairo_restrict_value (double value, dou - * away from 0. _cairo_round rounds halfway cases toward negative infinity. - * This matches the rounding behaviour of _cairo_lround. */ - static inline double cairo_const - _cairo_round (double r) - { - return floor (r + .5); - } - --#if DISABLE_SOME_FLOATING_POINT -+#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L - cairo_private int - _cairo_lround (double d) cairo_const; - #else - #define _cairo_lround lround - #endif - - cairo_private uint16_t - _cairo_half_from_float (float f) cairo_const;
--- a/js/src/aclocal.m4 +++ b/js/src/aclocal.m4 @@ -6,10 +6,11 @@ dnl builtin(include, build/autoconf/pkg.m4)dnl builtin(include, build/autoconf/nspr.m4)dnl builtin(include, build/autoconf/altoptions.m4)dnl builtin(include, build/autoconf/moznbytetype.m4)dnl builtin(include, build/autoconf/mozprog.m4)dnl builtin(include, build/autoconf/acwinpaths.m4)dnl builtin(include, build/autoconf/lto.m4)dnl builtin(include, build/autoconf/gcc-pr49911.m4)dnl +builtin(include, build/autoconf/frameptr.m4)dnl MOZ_PROG_CHECKMSYS()
new file mode 100644 --- /dev/null +++ b/js/src/build/autoconf/frameptr.m4 @@ -0,0 +1,25 @@ +dnl Set MOZ_FRAMEPTR_FLAGS to the flags that should be used for enabling or +dnl disabling frame pointers in this architecture based on the configure +dnl options + +AC_DEFUN([MOZ_SET_FRAMEPTR_FLAGS], [ + if test "$GNU_CC"; then + MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer" + MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer" + else + case "$target" in + *-mingw*) + MOZ_ENABLE_FRAME_PTR="-Oy-" + MOZ_DISABLE_FRAME_PTR="-Oy" + ;; + esac + fi + + # if we are debugging or profiling, we want a frame pointer. + if test -z "$MOZ_OPTIMIZE" -o \ + -n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then + MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" + else + MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" + fi +])
--- a/js/src/config/autoconf.mk.in +++ b/js/src/config/autoconf.mk.in @@ -138,16 +138,17 @@ OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @CO OS_INCLUDES = $(NSPR_CFLAGS) OS_LIBS = @LIBS@ ACDEFINES = @MOZ_DEFINES@ WARNINGS_AS_ERRORS = @WARNINGS_AS_ERRORS@ FAIL_ON_WARNINGS = @FAIL_ON_WARNINGS@ MOZ_OPTIMIZE = @MOZ_OPTIMIZE@ +MOZ_FRAMEPTR_FLAGS = @MOZ_FRAMEPTR_FLAGS@ MOZ_OPTIMIZE_FLAGS = @MOZ_OPTIMIZE_FLAGS@ MOZ_PGO_OPTIMIZE_FLAGS = @MOZ_PGO_OPTIMIZE_FLAGS@ MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@ MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@ MOZ_RTTI_FLAGS_ON = @_MOZ_RTTI_FLAGS_ON@ MOZ_EXCEPTIONS_FLAGS_ON = @_MOZ_EXCEPTIONS_FLAGS_ON@
--- a/js/src/config/config.mk +++ b/js/src/config/config.mk @@ -458,16 +458,19 @@ else HOST_CFLAGS += $(MOZ_OPTIMIZE_FLAGS) endif # MODULE_OPTIMIZE_FLAGS else HOST_CFLAGS += $(MOZ_OPTIMIZE_FLAGS) endif # MOZ_OPTIMIZE == 1 endif # MOZ_OPTIMIZE endif # CROSS_COMPILE +CFLAGS += $(MOZ_FRAMEPTR_FLAGS) +CXXFLAGS += $(MOZ_FRAMEPTR_FLAGS) + # Check for FAIL_ON_WARNINGS & FAIL_ON_WARNINGS_DEBUG (Shorthand for Makefiles # to request that we use the 'warnings as errors' compile flags) # NOTE: First, we clear FAIL_ON_WARNINGS[_DEBUG] if we're doing a Windows PGO # build, since WARNINGS_AS_ERRORS has been suspected of causing isuses in that # situation. (See bug 437002.) ifeq (WINNT_1,$(OS_ARCH)_$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE)) FAIL_ON_WARNINGS_DEBUG=
--- a/js/src/configure.in +++ b/js/src/configure.in @@ -1967,23 +1967,17 @@ case "$target" in MKSHLIB_UNFORCE_ALL='' ;; esac ;; *-darwin*) MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' - # If we're building with --enable-profiling, we need a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_FRAMEPTR_FLAGS="-fomit-frame-pointer" - else - MOZ_FRAMEPTR_FLAGS="-fno-omit-frame-pointer" - fi - MOZ_OPTIMIZE_FLAGS="-O3 $MOZ_FRAMEPTR_FLAGS -fno-stack-protector" + MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" _PEDANTIC= CFLAGS="$CFLAGS -fpascal-strings -fno-common" CXXFLAGS="$CXXFLAGS -fpascal-strings -fno-common" DLL_SUFFIX=".dylib" DSO_LDOPTS='' STRIP="$STRIP -x -S" _PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa' TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' @@ -2078,23 +2072,17 @@ ia64*-hpux*) *-android*|*-linuxandroid*) AC_DEFINE(NO_PW_GECOS) no_x=yes _PLATFORM_DEFAULT_TOOLKIT=cairo-android TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' MOZ_GFX_OPTIMIZE_MOBILE=1 - # If we're building with --enable-profiling, we need a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_FRAMEPTR_FLAGS="-fomit-frame-pointer" - else - MOZ_FRAMEPTR_FLAGS="-fno-omit-frame-pointer" - fi - MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions $MOZ_FRAMEPTR_FLAGS" + MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions" # The Maemo builders don't know about this flag MOZ_ARM_VFP_FLAGS="-mfpu=vfp" ;; *-*linux*) # Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler. # Similarly for GNU_CXX and INTEL_CXX. if test "$INTEL_CC" -o "$INTEL_CXX"; then @@ -2104,24 +2092,18 @@ ia64*-hpux*) MOZ_DEBUG_FLAGS="-g" elif test "$GNU_CC" -o "$GNU_CXX"; then GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'` case $GCC_VERSION in 4.1.*|4.2.*|4.5.*) # -Os is broken on gcc 4.1.x 4.2.x, 4.5.x we need to tweak it to get good results. MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" esac - # If we're building with --enable-profiling, we need a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_FRAMEPTR_FLAGS="-fomit-frame-pointer" - else - MOZ_FRAMEPTR_FLAGS="-fno-omit-frame-pointer" - fi - MOZ_PGO_OPTIMIZE_FLAGS="-O3 $MOZ_FRAMEPTR_FLAGS" - MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK $MOZ_FRAMEPTR_FLAGS" + MOZ_PGO_OPTIMIZE_FLAGS="-O3" + MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" MOZ_DEBUG_FLAGS="-g" fi TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' case "${target_cpu}" in alpha*) CFLAGS="$CFLAGS -mieee" @@ -2231,23 +2213,17 @@ ia64*-hpux*) CXXFLAGS="$CXXFLAGS -wd4244 -wd4800" # make 'foo == bar;' error out CFLAGS="$CFLAGS -we4553" CXXFLAGS="$CXXFLAGS -we4553" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" MOZ_DEBUG_FLAGS='-Zi' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' WARNINGS_AS_ERRORS='-WX' - # If we're building with --enable-profiling, we need -Oy-, which forces a frame pointer. - if test -z "$MOZ_PROFILING"; then - MOZ_FRAMEPTR_FLAGS= - else - MOZ_FRAMEPTR_FLAGS='-Oy-' - fi - MOZ_OPTIMIZE_FLAGS="-O2 $MOZ_FRAMEPTR_FLAGS" + MOZ_OPTIMIZE_FLAGS="-O2" MOZ_JS_LIBS='$(libdir)/mozjs.lib' MOZ_FIX_LINK_PATHS= DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib' XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib' LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib' MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)' if test $_MSC_VER -ge 1400; then LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT" @@ -4388,16 +4364,18 @@ MOZ_ARG_ENABLE_STRING(optimize, if test -n "$enableval" -a "$enableval" != "yes"; then MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'` MOZ_OPTIMIZE=2 fi else MOZ_OPTIMIZE= fi ], MOZ_OPTIMIZE=1) +MOZ_SET_FRAMEPTR_FLAGS + if test "$COMPILE_ENVIRONMENT"; then if test -n "$MOZ_OPTIMIZE"; then AC_MSG_CHECKING([for valid optimization flags]) _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" AC_TRY_COMPILE([#include <stdio.h>], [printf("Hello World\n");], _results=yes, @@ -4406,16 +4384,17 @@ if test -n "$MOZ_OPTIMIZE"; then if test "$_results" = "no"; then AC_MSG_ERROR([These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS]) fi CFLAGS=$_SAVE_CFLAGS fi fi # COMPILE_ENVIRONMENT AC_SUBST(MOZ_OPTIMIZE) +AC_SUBST(MOZ_FRAMEPTR_FLAGS) AC_SUBST(MOZ_OPTIMIZE_FLAGS) AC_SUBST(MOZ_OPTIMIZE_LDFLAGS) AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK) AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS) dnl ======================================================== dnl = Enable generation of debug symbols dnl ========================================================
--- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -17166,16 +17166,17 @@ LoopProfile::profileOperation(JSContext* } else if (op == JSOP_TYPEOF || op == JSOP_TYPEOFEXPR) { stackPush(StackValue(true)); } else if (op == JSOP_EQ || op == JSOP_NE) { StackValue v1 = stackAt(-1); StackValue v2 = stackAt(-2); stackPush(StackValue(v1.isConst && v2.isConst)); } else if (op == JSOP_AND) { bool b = !!js_ValueToBoolean(cx->regs().sp[-1]); + StackValue v = stackAt(-1); if (b) stackPop(); } else { stackClear(); } return ProfContinue; }
deleted file mode 100644 --- a/layout/reftests/svg/smil/anim-discrete-values-2.svg +++ /dev/null @@ -1,31 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - class="reftest-wait" - onload="setTimeAndSnapshot(29, true)"> - <script xlink:href="smil-util.js" type="text/javascript"/> - <title>Test discrete keyTimes are scaled correctly (Bug 681645)</title> - <rect x="15" y="15" width="200" height="200" fill="blue"> - <animate attributeName="fill" begin="0" dur="100s" - calcMode="discrete" - values="red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;blue; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red" - keyTimes="0.00;0.01;0.02;0.03;0.04;0.05;0.06;0.07;0.08;0.09; - 0.10;0.11;0.12;0.13;0.14;0.15;0.16;0.17;0.18;0.19; - 0.20;0.21;0.22;0.23;0.24;0.25;0.26;0.27;0.28;0.29; - 0.30;0.31;0.32;0.33;0.34;0.35;0.36;0.37;0.38;0.39; - 0.40;0.41;0.42;0.43;0.44;0.45;0.46;0.47;0.48;0.49; - 0.50;0.51;0.52;0.53;0.54;0.55;0.56;0.57;0.58;0.59; - 0.60;0.61;0.62;0.63;0.64;0.65;0.66;0.67;0.68;0.69; - 0.70;0.71;0.72;0.73;0.74;0.75;0.76;0.77;0.78;0.79; - 0.80;0.81;0.82;0.83;0.84;0.85;0.86;0.87;0.88;0.89; - 0.90;0.91;0.92;0.93;0.94;0.95;0.96;0.97;0.98;0.99"/> - </rect> -</svg>
deleted file mode 100644 --- a/layout/reftests/svg/smil/anim-discrete-values-3.svg +++ /dev/null @@ -1,21 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - class="reftest-wait" - onload="setTimeAndSnapshot(29, true)"> - <script xlink:href="smil-util.js" type="text/javascript"/> - <title>Test discrete keyTimes are scaled correctly (Bug 681645)</title> - <rect x="15" y="15" width="200" height="200" fill="blue"> - <animate attributeName="fill" begin="0" dur="100s" - calcMode="discrete" - values="red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;blue; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red; - red;red;red;red;red;red;red;red;red;red"/> - </rect> -</svg>
--- a/layout/reftests/svg/smil/reftest.list +++ b/layout/reftests/svg/smil/reftest.list @@ -50,18 +50,16 @@ include syncbase/reftest.list # seek tests include seek/reftest.list # event tests include event/reftest.list # General tests == anim-discrete-values-1.svg anim-standard-ref.svg -== anim-discrete-values-2.svg anim-standard-ref.svg -== anim-discrete-values-3.svg anim-standard-ref.svg == anim-discrete-replace-sum-1.svg anim-standard-ref.svg == anim-discrete-sum-none-1.svg anim-standard-ref.svg == anim-discrete-sum-sum-1.svg anim-standard-ref.svg == anim-discrete-to-1.svg anim-standard-ref.svg == anim-discrete-to-2.svg anim-standard-ref.svg == anim-discrete-to-3.svg anim-standard-ref.svg == anim-discrete-to-4.svg anim-standard-ref.svg
--- a/modules/libjar/zipwriter/src/nsDeflateConverter.cpp +++ b/modules/libjar/zipwriter/src/nsDeflateConverter.cpp @@ -71,18 +71,16 @@ nsresult nsDeflateConverter::Init() PRInt32 window = MAX_WBITS; switch (mWrapMode) { case WRAP_NONE: window = -window; break; case WRAP_GZIP: window += 16; break; - default: - break; } zerr = deflateInit2(&mZstream, mLevel, Z_DEFLATED, window, 8, Z_DEFAULT_STRATEGY); if (zerr != Z_OK) return NS_ERROR_OUT_OF_MEMORY; mZstream.next_out = mWriteBuffer; mZstream.avail_out = sizeof(mWriteBuffer);
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in +++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in @@ -47,17 +47,17 @@ ifdef MOZ_THUMB2 #{ # complains if we store to r7, not unreasonably, but complains # inconsistently. The generic syscall template pushes/stores to/pops # r7 with no complaint from gcc, but the sys_clone() function marks r7 # as a clobbered register yet gcc error's. The generated assembly for # sys_clone() looks OK, so we chalk this up to a gcc/gas quirk and # work around it by telling gcc that the THUMB frame pointer is a # vanilla callee-save register. OS_CXXFLAGS += -fomit-frame-pointer -MOZ_OPTIMIZE_FLAGS := $(filter-out -fno-omit-frame-pointer,$(MOZ_OPTIMIZE_FLAGS)) +MOZ_FRAMEPTR_FLAGS := -fomit-frame-pointer endif #} MODULE = handler LIBRARY_NAME = exception_handler_s XPI_NAME = crashreporter LOCAL_INCLUDES = -I$(srcdir)/../../..
--- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -392,18 +392,28 @@ SDK = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSI ifeq ($(MOZ_APP_NAME),xulrunner) SDK = $(SDK_PATH)$(MOZ_APP_NAME)-$(MOZ_PKG_VERSION).$(AB_CD).mac-$(TARGET_CPU).sdk$(SDK_SUFFIX) endif MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK) endif ifdef MOZ_OMNIJAR +# Set MOZ_CAN_RUN_PROGRAMS for trivial cases. +ifndef MOZ_CAN_RUN_PROGRAMS +ifdef UNIVERSAL_BINARY +MOZ_CAN_RUN_PROGRAMS=1 +endif +ifndef CROSS_COMPILE +MOZ_CAN_RUN_PROGRAMS=1 +endif +endif # MOZ_CAN_RUN_PROGRAMS + ifdef GENERATE_CACHE -ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(UNIVERSAL_BINARY)) +ifdef MOZ_CAN_RUN_PROGRAMS ifdef RUN_TEST_PROGRAM _ABS_RUN_TEST_PROGRAM = $(call core_abspath,$(RUN_TEST_PROGRAM)) endif ifdef LIBXUL_SDK PRECOMPILE_DIR=XCurProcD PRECOMPILE_RESOURCE=app PRECOMPILE_GRE=$(LIBXUL_DIST)/bin @@ -472,17 +482,17 @@ MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG UNMAKE_PACKAGE = $(INNER_UNMAKE_PACKAGE) && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(UNPACK_OMNIJAR)) else MAKE_PACKAGE = (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE) UNMAKE_PACKAGE = $(INNER_UNMAKE_PACKAGE) endif # dummy macro if we don't have PSM built SIGN_NSS = -ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(UNIVERSAL_BINARY)) +ifdef MOZ_CAN_RUN_PROGRAMS ifdef MOZ_PSM SIGN_NSS = @echo signing nss libraries; NSS_DLL_SUFFIX = $(DLL_SUFFIX) ifdef UNIVERSAL_BINARY NATIVE_ARCH = $(shell uname -p | sed -e s/powerpc/ppc/) NATIVE_DIST = $(DIST:$(DEPTH)/%=$(DEPTH)/../$(NATIVE_ARCH)/%) SIGN_CMD = $(NATIVE_DIST)/bin/run-mozilla.sh $(NATIVE_DIST)/bin/shlibsign -v -i
--- a/widget/src/android/AndroidJNI.cpp +++ b/widget/src/android/AndroidJNI.cpp @@ -166,16 +166,17 @@ Java_org_mozilla_gecko_GeckoAppShell_onC nsJNIString sType(jType, jenv); nsAppShell::gAppShell->NotifyObservers(nsnull, NS_NETWORK_LINK_TYPE_TOPIC, sType.get()); } NS_EXPORT void JNICALL -Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash(JNIEnv *jenv, jclass, jstring stack) +Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash(JNIEnv *, jclass, jstring stack) { #ifdef MOZ_CRASHREPORTER - nsJNIString javaStack(stack, jenv); - CrashReporter::AppendAppNotesToCrashReport(NS_ConvertUTF16toUTF8(javaStack)); + nsJNIString javaStack(stack); + CrashReporter::AppendAppNotesToCrashReport( + NS_ConvertUTF16toUTF8(javaStack)); #endif abort(); }
--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in +++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in @@ -64,20 +64,24 @@ ifneq (86,$(findstring 86,$(OS_TEST))) NO_PROFILE_GUIDED_OPTIMIZE = 1 endif endif ifeq (Darwin,$(OS_ARCH)) ifeq (86,$(findstring 86,$(OS_TEST))) ifneq (x86_64,$(OS_TEST)) # If we compile xptcinvoke_unixish_x86.cpp with -fomit-frame-pointer -# we end up crashing on startup, presumably because of the %esp munging we do -# when KEEP_STACK_16_BYTE_ALIGNED. So let's not use that flag here. -# NOTE: MODULE_OPTIMIZE_FLAGS must be set before including config.mk -MODULE_OPTIMIZE_FLAGS=-O3 +# we end up crashing on startup. This is because +# "movl %5, %%eax\n\t" /* function index */ +# becomes +# mov 0x1c(%esp),%eax +# but we have modified esp. +# NOTE: MOZ_FRAMEPTR_FLAGS must be set before including config.mk +# FIXME: change the file instead of using this hack. +MOZ_FRAMEPTR_FLAGS=-fno-omit-frame-pointer endif endif endif include $(topsrcdir)/config/config.mk ###################################################################### # i386 and beyond