Hello community, here is the log from the commit of package seamonkey for openSUSE:Factory checked in at 2012-07-22 15:25:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/seamonkey (Old) and /work/SRC/openSUSE:Factory/.seamonkey.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "seamonkey", Maintainer is "gnome-maintain...@suse.de" Changes: -------- --- /work/SRC/openSUSE:Factory/seamonkey/seamonkey.changes 2012-06-18 17:31:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.seamonkey.new/seamonkey.changes 2012-07-22 15:26:01.000000000 +0200 @@ -1,0 +2,32 @@ +Mon Jul 16 09:35:54 UTC 2012 - w...@rosenauer.org + +- update to Seamonkey 2.11 (bnc#771583) + * MFSA 2012-42/CVE-2012-1949/CVE-2012-1948 + Miscellaneous memory safety hazards + * MFSA 2012-44/CVE-2012-1951/CVE-2012-1954/CVE-2012-1953/CVE-2012-1952 + Gecko memory corruption + * MFSA 2012-45/CVE-2012-1955 (bmo#757376) + Spoofing issue with location + * MFSA 2012-47/CVE-2012-1957 (bmo#750096) + Improper filtering of javascript in HTML feed-view + * MFSA 2012-48/CVE-2012-1958 (bmo#750820) + use-after-free in nsGlobalWindow::PageHidden + * MFSA 2012-49/CVE-2012-1959 (bmo#754044, bmo#737559) + Same-compartment Security Wrappers can be bypassed + * MFSA 2012-50/CVE-2012-1960 (bmo#761014) + Out of bounds read in QCMS + * MFSA 2012-51/CVE-2012-1961 (bmo#761655) + X-Frame-Options header ignored when duplicated + * MFSA 2012-52/CVE-2012-1962 (bmo#764296) + JSDependentString::undepend string conversion results in memory + corruption + * MFSA 2012-53/CVE-2012-1963 (bmo#767778) + Content Security Policy 1.0 implementation errors cause data + leakage + * MFSA 2012-56/CVE-2012-1967 (bmo#758344) + Code execution through javascript: URLs + * relicensed to MPL-2.0 +- updated/removed patches +- requires NSS 3.13.5 + +------------------------------------------------------------------- Old: ---- l10n-2.10.1.tar.bz2 mozilla-revert_621446.patch mozilla-system-nspr.patch seamonkey-2.10.1-source.tar.bz2 New: ---- l10n-2.11.tar.bz2 seamonkey-2.11-source.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ seamonkey.spec ++++++ --- /var/tmp/diff_new_pack.HRuyDL/_old 2012-07-22 15:26:09.000000000 +0200 +++ /var/tmp/diff_new_pack.HRuyDL/_new 2012-07-22 15:26:09.000000000 +0200 @@ -42,11 +42,11 @@ BuildRequires: wireless-tools %endif Provides: web_browser -Version: 2.10.1 +Version: 2.11 Release: 0 -%define releasedate 2012061400 +%define releasedate 2012071300 Summary: The successor of the Mozilla Application Suite -License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+ +License: MPL-2.0 Group: Productivity/Networking/Web/Browsers Url: http://www.mozilla.org/projects/seamonkey Source: seamonkey-%{version}-source.tar.bz2 @@ -65,12 +65,10 @@ Patch3: mozilla-shared-nss-db.patch Patch4: mozilla-sle11.patch Patch5: mozilla-language.patch -Patch6: mozilla-revert_621446.patch Patch8: mozilla-ntlm-full-path.patch Patch10: mozilla-ua-locale.patch Patch11: mozilla-gcc47.patch Patch12: mozilla-yarr-pcre.patch -Patch13: mozilla-system-nspr.patch Patch20: seamonkey-ua-locale.patch Patch21: seamonkey-shared-nss-db.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -95,7 +93,7 @@ # so using %opensuse_bs is secure for now BuildRequires: mozilla-nspr-devel PreReq: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) -BuildRequires: mozilla-nss-devel >= 3.13.4 +BuildRequires: mozilla-nss-devel >= 3.13.5 PreReq: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) %description @@ -168,12 +166,10 @@ %patch4 -p1 %endif %patch5 -p1 -%patch6 -p1 %patch8 -p1 %patch10 -p1 %patch11 -p1 -#%patch12 -p1 -%patch13 -p1 +%patch12 -p1 popd # comm patches %patch20 -p1 ++++++ compare-locales.tar.bz2 ++++++ ++++++ create-tar.sh ++++++ --- /var/tmp/diff_new_pack.HRuyDL/_old 2012-07-22 15:26:09.000000000 +0200 +++ /var/tmp/diff_new_pack.HRuyDL/_new 2012-07-22 15:26:09.000000000 +0200 @@ -2,8 +2,8 @@ CHANNEL="release" BRANCH="releases/comm-$CHANNEL" -RELEASE_TAG="SEAMONKEY_2_10_1_RELEASE" -VERSION="2.10.1" +RELEASE_TAG="SEAMONKEY_2_11_RELEASE" +VERSION="2.11" echo "cloning $BRANCH..." hg clone http://hg.mozilla.org/$BRANCH seamonkey ++++++ l10n-2.10.1.tar.bz2 -> l10n-2.11.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/seamonkey/l10n-2.10.1.tar.bz2 /work/SRC/openSUSE:Factory/.seamonkey.new/l10n-2.11.tar.bz2 differ: char 11, line 1 ++++++ mozilla-gcc47.patch ++++++ --- /var/tmp/diff_new_pack.HRuyDL/_old 2012-07-22 15:26:09.000000000 +0200 +++ /var/tmp/diff_new_pack.HRuyDL/_new 2012-07-22 15:26:09.000000000 +0200 @@ -1,113 +1,14 @@ # HG changeset patch -# Parent 7bc8f0e5bed8cb2212e27228e628861737256459 -Patch to make Mozilla build with gcc 4.7, including -- Bug 734490 - "no viable overloaded 'PRIxPTR'" when building with Clang or GCC 4.7 (TM: Mozilla14) -- Bug 741348 - Work around crashreporter client build failure with gcc 4.7 (TM: Mozilla15) +# User Mike Hommey <mh+mozi...@glandium.org> +# Date 1336991062 -7200 +# Node ID 234d34706ea1a0e9a9d2c61561c4441590712df0 +# Parent 0f2f145158b595f5242bf0d79b2de413373730c1 +Bug 741348 - Work around crashreporter client build failure with gcc 4.7 -diff --git a/layout/base/tests/TestPoisonArea.cpp b/layout/base/tests/TestPoisonArea.cpp ---- a/layout/base/tests/TestPoisonArea.cpp -+++ b/layout/base/tests/TestPoisonArea.cpp -@@ -392,53 +392,53 @@ ReservePoisonArea() - { - if (sizeof(uintptr_t) == 8) { - // Use the hardware-inaccessible region. - // We have to avoid 64-bit constants and shifts by 32 bits, since this - // code is compiled in 32-bit mode, although it is never executed there. - uintptr_t result = (((uintptr_t(0x7FFFFFFFu) << 31) << 1 | - uintptr_t(0xF0DEAFFFu)) & - ~uintptr_t(PAGESIZE-1)); -- printf("INFO | poison area assumed at 0x%.*"PRIxPTR"\n", SIZxPTR, result); -+ printf("INFO | poison area assumed at 0x%.*" PRIxPTR "\n", SIZxPTR, result); - return result; - } else { - // First see if we can allocate the preferred poison address from the OS. - uintptr_t candidate = (0xF0DEAFFF & ~(PAGESIZE-1)); - void *result = ReserveRegion(candidate, false); - if (result == (void *)candidate) { - // success - inaccessible page allocated -- printf("INFO | poison area allocated at 0x%.*"PRIxPTR -+ printf("INFO | poison area allocated at 0x%.*" PRIxPTR - " (preferred addr)\n", SIZxPTR, (uintptr_t)result); - return candidate; - } - - // That didn't work, so see if the preferred address is within a range - // of permanently inacessible memory. - if (ProbeRegion(candidate)) { - // success - selected page cannot be usable memory - if (result != MAP_FAILED) - ReleaseRegion(result); -- printf("INFO | poison area assumed at 0x%.*"PRIxPTR -+ printf("INFO | poison area assumed at 0x%.*" PRIxPTR - " (preferred addr)\n", SIZxPTR, candidate); - return candidate; - } - - // The preferred address is already in use. Did the OS give us a - // consolation prize? - if (result != MAP_FAILED) { -- printf("INFO | poison area allocated at 0x%.*"PRIxPTR -+ printf("INFO | poison area allocated at 0x%.*" PRIxPTR - " (consolation prize)\n", SIZxPTR, (uintptr_t)result); - return (uintptr_t)result; - } - - // It didn't, so try to allocate again, without any constraint on - // the address. - result = ReserveRegion(0, false); - if (result != MAP_FAILED) { -- printf("INFO | poison area allocated at 0x%.*"PRIxPTR -+ printf("INFO | poison area allocated at 0x%.*" PRIxPTR - " (fallback)\n", SIZxPTR, (uintptr_t)result); - return (uintptr_t)result; - } - - printf("ERROR | no usable poison area found\n"); - return 0; - } - } -@@ -450,17 +450,17 @@ static uintptr_t - ReservePositiveControl() - { - - void *result = ReserveRegion(0, false); - if (result == MAP_FAILED) { - printf("ERROR | allocating positive control | %s\n", LastErrMsg()); - return 0; - } -- printf("INFO | positive control allocated at 0x%.*"PRIxPTR"\n", -+ printf("INFO | positive control allocated at 0x%.*" PRIxPTR "\n", - SIZxPTR, (uintptr_t)result); - return (uintptr_t)result; - } - - /* The "negative control" area confirms that our probe logic does detect a - * page that is readable, writable, or executable. - */ - static uintptr_t -@@ -481,17 +481,17 @@ ReserveNegativeControl() - // Now mark it executable as well as readable and writable. - // (mmap(PROT_EXEC) may fail when applied to anonymous memory.) - - if (MakeRegionExecutable(result)) { - printf("ERROR | making negative control executable | %s\n", LastErrMsg()); - return 0; - } - -- printf("INFO | negative control allocated at 0x%.*"PRIxPTR"\n", -+ printf("INFO | negative control allocated at 0x%.*" PRIxPTR "\n", - SIZxPTR, (uintptr_t)result); - return (uintptr_t)result; - } - - static void - JumpTo(uintptr_t opaddr) - { - #ifdef __ia64 diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in b/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in --- a/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in +++ b/toolkit/crashreporter/google-breakpad/src/common/linux/Makefile.in -@@ -61,8 +61,11 @@ HOST_CPPSRCS = \ +@@ -65,8 +65,11 @@ HOST_CPPSRCS = \ file_id.cc \ guid_creator.cc \ $(NULL) ++++++ mozilla-prefer_plugin_pref.patch ++++++ --- /var/tmp/diff_new_pack.HRuyDL/_old 2012-07-22 15:26:09.000000000 +0200 +++ /var/tmp/diff_new_pack.HRuyDL/_new 2012-07-22 15:26:09.000000000 +0200 @@ -4,7 +4,7 @@ diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp -@@ -1580,17 +1580,48 @@ nsPluginHost::FindPluginForType(const ch +@@ -1561,17 +1561,45 @@ nsPluginHost::FindPluginForType(const ch bool aCheckEnabled) { if (!aMimeType) { @@ -13,18 +13,15 @@ LoadPlugins(); -+ nsresult res; -+ nsCOMPtr<nsIPrefBranch> prefB (do_QueryInterface(mPrefService)); -+ + char *preferredPluginPath = NULL; + nsCAutoString mimetypePrefString ("modules.plugins.mimetype."); + mimetypePrefString.Append(aMimeType); + const char *mimetypePrefChar = mimetypePrefString.get(); -+ res = prefB->GetCharPref(mimetypePrefChar, &preferredPluginPath); -+ -+ if(!NS_SUCCEEDED(res)) preferredPluginPath = NULL; ++ nsAdoptingCString pluginPath = Preferences::GetCString(mimetypePrefChar); ++ preferredPluginPath = (char*) pluginPath.get(); + nsPluginTag *plugin = mPlugins; ++ + if(preferredPluginPath) { + while (nsnull != plugin) { + if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) || ++++++ mozilla-shared-nss-db.patch ++++++ --- /var/tmp/diff_new_pack.HRuyDL/_old 2012-07-22 15:26:09.000000000 +0200 +++ /var/tmp/diff_new_pack.HRuyDL/_new 2012-07-22 15:26:09.000000000 +0200 @@ -1,16 +1,16 @@ From: Hans Petter Jansson <h...@copyleft.no> Wolfgang Rosenauer <w...@rosenauer.org> Subject: use libnsssharedhelper if available at compile time - (can be disabled by exporting MOZ_SM_NO_NSSHELPER=1) + (can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1) References: diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in -@@ -581,16 +581,20 @@ MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS - MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@ +@@ -590,16 +590,20 @@ MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNO MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@ + MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -31,7 +31,7 @@ diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in -@@ -8213,16 +8213,31 @@ AC_SUBST(QCMS_LIBS) +@@ -8180,16 +8180,31 @@ AC_SUBST(QCMS_LIBS) dnl ======================================================== dnl HarfBuzz @@ -66,7 +66,7 @@ diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in --- a/security/manager/ssl/src/Makefile.in +++ b/security/manager/ssl/src/Makefile.in -@@ -118,12 +118,14 @@ EXTRA_DEPS = $(NSS_DEP_LIBS) +@@ -119,12 +119,14 @@ EXTRA_DEPS = $(NSS_DEP_LIBS) DEFINES += \ -DNSS_ENABLE_ECC \ -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ @@ -109,7 +109,7 @@ #include "nsNetUtil.h" #include "nsAppDirectoryServiceDefs.h" #include "nsDirectoryService.h" -@@ -1733,18 +1740,34 @@ nsNSSComponent::InitializeNSS(bool showW +@@ -1776,18 +1783,34 @@ nsNSSComponent::InitializeNSS(bool showW ConfigureInternalPKCS11Token(); // The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs @@ -126,7 +126,7 @@ + init_rv = ::NSS_Initialize(profileStr.get(), "", "", + SECMOD_DB, init_flags); + } else { -+ init_rv = ::nsshelp_open_db ("SeaMonkey", profileStr.get(), init_flags); ++ init_rv = ::nsshelp_open_db ("Seamonkey", profileStr.get(), init_flags); + + if (init_rv != SECSuccess) { + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get())); @@ -149,7 +149,7 @@ diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in -@@ -471,17 +471,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO +@@ -439,17 +439,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO endif endif endif ++++++ mozilla-yarr-pcre.patch ++++++ --- /var/tmp/diff_new_pack.HRuyDL/_old 2012-07-22 15:26:09.000000000 +0200 +++ /var/tmp/diff_new_pack.HRuyDL/_new 2012-07-22 15:26:09.000000000 +0200 @@ -1,103 +1,219 @@ -From: Mike Hommey <m...@glandium.org> -Date: Sat, 24 Dec 2011 09:56:58 +0100 -Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where - YARR JIT is not supported - ---- - js/src/Makefile.in | 21 +++++++++++++-------- - js/src/vm/RegExpObject-inl.h | 28 ++++++---------------------- - js/src/vm/RegExpObject.cpp | 36 ------------------------------------ - js/src/vm/RegExpObject.h | 27 ++++++--------------------- - js/src/yarr/wtfbridge.h | 2 -- - 5 files changed, 25 insertions(+), 89 deletions(-) +# HG changeset patch +# Parent 831eeca7b7cfa9ae2458d9efafe168027259965f +# User Landry Breuil <lan...@openbsd.org> +Bug 691898 - Use YARR regexp interpreter instead of PCRE on platforms where YARR JIT is not supported r=dmandelin +PCRE doesn't build anyway. diff --git a/js/src/Makefile.in b/js/src/Makefile.in -index fc48cbd..49f0bdc 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in -@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \ +@@ -315,30 +315,33 @@ ifeq (mips, $(findstring mips,$(TARGET_C + CPPSRCS += TrampolineMIPS.cpp + endif + # + # END enclude sources for the method JIT + ############################################# - ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU))) + endif + +-# For architectures without YARR JIT, PCRE is faster than the YARR +-# interpreter (bug 684559). +- + ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -VPATH += $(srcdir)/yarr/pcre \ -+VPATH += $(srcdir)/assembler \ -+ $(srcdir)/assembler/wtf \ -+ $(srcdir)/yarr \ ++VPATH += $(srcdir)/assembler \ ++ $(srcdir)/assembler/wtf \ ++ $(srcdir)/assembler/jit \ ++ $(srcdir)/yarr \ $(NULL) - CPPSRCS += \ +-CPPSRCS += \ - pcre_compile.cpp \ - pcre_exec.cpp \ - pcre_tables.cpp \ - pcre_xclass.cpp \ - pcre_ucp_searchfuncs.cpp \ -+ Assertions.cpp \ -+ OSAllocatorOS2.cpp \ -+ OSAllocatorPosix.cpp \ -+ OSAllocatorWin.cpp \ -+ PageBlock.cpp \ -+ YarrInterpreter.cpp \ -+ YarrPattern.cpp \ -+ YarrSyntaxChecker.cpp \ ++CPPSRCS += ExecutableAllocator.cpp \ ++ ExecutableAllocatorPosix.cpp \ ++ OSAllocatorOS2.cpp \ ++ OSAllocatorPosix.cpp \ ++ OSAllocatorWin.cpp \ ++ PageBlock.cpp \ ++ YarrInterpreter.cpp \ ++ YarrPattern.cpp \ ++ YarrSyntaxChecker.cpp \ $(NULL) else -@@ -1015,10 +1020,10 @@ endif - # Needed to "configure" it correctly. Unfortunately these - # flags wind up being applied to all code in js/src, not just - # the code in js/src/assembler. --CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 - - ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT)) --CXXFLAGS += -DENABLE_JIT=1 -+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1 - endif + ############################################### + # BEGIN include sources for the Nitro assembler + # + + ENABLE_YARR_JIT = 1 +diff --git a/js/src/assembler/jit/ExecutableAllocator.h b/js/src/assembler/jit/ExecutableAllocator.h +--- a/js/src/assembler/jit/ExecutableAllocator.h ++++ b/js/src/assembler/jit/ExecutableAllocator.h +@@ -462,18 +462,16 @@ public: + : "r" (code), "r" (reinterpret_cast<char*>(code) + size) + : "r0", "r1", "r2"); + } + #elif WTF_CPU_SPARC + static void cacheFlush(void* code, size_t size) + { + sync_instruction_memory((caddr_t)code, size); + } +-#else +- #error "The cacheFlush support is missing on this platform." + #endif + + private: + + #if ENABLE_ASSEMBLER_WX_EXCLUSIVE + static void reprotectRegion(void*, size_t, ProtectionSetting); + #endif - INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h -index 5f7817d..91108a7 100644 --- a/js/src/vm/RegExpObject-inl.h +++ b/js/src/vm/RegExpObject-inl.h -@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt - return RetType(self); +@@ -132,26 +132,28 @@ RegExpObject::setMultiline(bool enabled) + } + + inline void + RegExpObject::setSticky(bool enabled) + { + setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); } +#if ENABLE_YARR_JIT /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ inline bool - RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) -@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) + detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx) + { + #if defined(ANDROID) && defined(JS_METHODJIT) + return cx->methodJitEnabled; + #else return true; #endif } +#endif inline bool - RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, - uintN *parenCount, RegExpFlag flags) + RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) + { + JS_ASSERT(ObjectClassIs(obj, ESClass_RegExp, cx)); + if (obj.isRegExp()) + return obj.asRegExp().getShared(cx, g); + return Proxy::regexp_toShared(cx, &obj, g); +diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp +--- a/js/src/vm/RegExpObject.cpp ++++ b/js/src/vm/RegExpObject.cpp +@@ -163,17 +163,16 @@ MatchPairs::checkAgainst(size_t inputLen + continue; + JS_ASSERT(size_t(p.limit) <= inputLength); + } + #endif + } + + /* detail::RegExpCode */ + +-#if ENABLE_YARR_JIT + void + RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) + { + switch (error) { + case JSC::Yarr::NoError: + JS_NOT_REACHED("Called reportYarrError with value for no error"); + return; + #define COMPILE_EMSG(__code, __msg) \ +@@ -195,73 +194,36 @@ RegExpCode::reportYarrError(JSContext *c + COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER); + COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH); + #undef COMPILE_EMSG + default: + JS_NOT_REACHED("Unknown Yarr error code"); + } + } + +-#else /* !ENABLE_YARR_JIT */ +- +-void +-RegExpCode::reportPCREError(JSContext *cx, int error) +-{ +-#define REPORT(msg_) \ +- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ +- return +- switch (error) { +- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); +- case 1: REPORT(JSMSG_TRAILING_SLASH); +- case 2: REPORT(JSMSG_TRAILING_SLASH); +- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 4: REPORT(JSMSG_BAD_QUANTIFIER); +- case 5: REPORT(JSMSG_BAD_QUANTIFIER); +- case 6: REPORT(JSMSG_BAD_CLASS_RANGE); +- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 8: REPORT(JSMSG_BAD_CLASS_RANGE); +- case 9: REPORT(JSMSG_BAD_QUANTIFIER); +- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); +- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); +- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 14: REPORT(JSMSG_MISSING_PAREN); +- case 15: REPORT(JSMSG_BAD_BACKREF); +- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX); +- default: +- JS_NOT_REACHED("Precondition violation: unknown PCRE error code."); +- } +-#undef REPORT +-} +- +-#endif /* ENABLE_YARR_JIT */ +- + bool + RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags) { -#if ENABLE_YARR_JIT /* Parse the pattern. */ ErrorCode yarrError; YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream * + &yarrError); + if (yarrError) { + reportYarrError(cx, NULL, yarrError); + return false; + } + *parenCount = yarrPattern.m_numSubpatterns; + + /* + * The YARR JIT compiler attempts to compile the parsed pattern. If + * it cannot, it informs us via |codeBlock.isFallBack()|, in which * case we have to bytecode compile it. */ -#ifdef JS_METHODJIT +#if ENABLE_YARR_JIT && defined(JS_METHODJIT) if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { - if (!cx->compartment->ensureJaegerCompartmentExists(cx)) + JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); + if (!execAlloc) { + js_ReportOutOfMemory(cx); return false; -@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream * - } + } + + JSGlobalData globalData(execAlloc); +@@ -272,58 +234,41 @@ RegExpCode::compile(JSContext *cx, JSLin #endif + WTF::BumpPointerAllocator *bumpAlloc = cx->runtime->getBumpPointerAllocator(cx); + if (!bumpAlloc) { + js_ReportOutOfMemory(cx); + return false; + } + +#if ENABLE_YARR_JIT codeBlock.setFallBack(true); +#endif - byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get(); + byteCode = byteCompile(yarrPattern, bumpAlloc).get(); return true; -#else /* !defined(ENABLE_YARR_JIT) */ - int error = 0; @@ -113,8 +229,15 @@ -#endif } - inline bool -@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz + RegExpRunStatus + RegExpCode::execute(JSContext *cx, const jschar *chars, size_t length, size_t start, + int *output, size_t outputCount) + { + int result; + #if ENABLE_YARR_JIT + (void) cx; /* Unused. */ + if (codeBlock.isFallBack()) + result = JSC::Yarr::interpret(byteCode, chars, start, length, output); else result = JSC::Yarr::execute(codeBlock, chars, start, length, output); #else @@ -123,88 +246,56 @@ #endif if (result == -1) - return Success_NotFound; + return RegExpRunStatus_Success_NotFound; -#if !ENABLE_YARR_JIT - if (result < 0) { - reportPCREError(cx, result); -- return Error; +- return RegExpRunStatus_Error; - } -#endif - JS_ASSERT(result >= 0); - return Success; + return RegExpRunStatus_Success; } -diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp -index f75c6a5..7631dd5 100644 ---- a/js/src/vm/RegExpObject.cpp -+++ b/js/src/vm/RegExpObject.cpp -@@ -251,7 +251,6 @@ Class js::RegExpClass = { - NULL /* trace */ - }; --#if ENABLE_YARR_JIT - void - RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) - { -@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err - } - } + /* RegExpObject */ --#else /* !ENABLE_YARR_JIT */ -- --void --RegExpPrivateCode::reportPCREError(JSContext *cx, int error) --{ --#define REPORT(msg_) \ -- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ -- return -- switch (error) { -- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); -- case 1: REPORT(JSMSG_TRAILING_SLASH); -- case 2: REPORT(JSMSG_TRAILING_SLASH); -- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 4: REPORT(JSMSG_BAD_QUANTIFIER); -- case 5: REPORT(JSMSG_BAD_QUANTIFIER); -- case 6: REPORT(JSMSG_BAD_CLASS_RANGE); -- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 8: REPORT(JSMSG_BAD_CLASS_RANGE); -- case 9: REPORT(JSMSG_BAD_QUANTIFIER); -- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); -- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); -- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 14: REPORT(JSMSG_MISSING_PAREN); -- case 15: REPORT(JSMSG_BAD_BACKREF); -- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- default: -- JS_NOT_REACHED("Precondition violation: unknown PCRE error code."); -- } --#undef REPORT --} --#endif /* ENABLE_YARR_JIT */ -- - bool - js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut) - { + static void + regexp_trace(JSTracer *trc, JSObject *obj) diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h -index 1449d56..279f3c0 100644 --- a/js/src/vm/RegExpObject.h +++ b/js/src/vm/RegExpObject.h -@@ -49,8 +49,6 @@ +@@ -47,20 +47,18 @@ + #include "jscntxt.h" + #include "jsobj.h" + + #include "js/TemplateLib.h" + #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" ++#endif + #include "yarr/YarrSyntaxChecker.h" -#else -#include "yarr/pcre/pcre.h" - #endif +-#endif + + /* + * JavaScript Regular Expressions + * + * There are several engine concepts associated with a single logical regexp: + * + * RegExpObject - The JS-visible object whose .[[Class]] equals "RegExp" + * +@@ -108,78 +106,61 @@ class RegExpObjectBuilder - namespace js { -@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep); - /* Abstracts away the gross |RegExpPrivate| backend details. */ - class RegExpPrivateCode + JSObject * + CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto); + + namespace detail { + + class RegExpCode { -#if ENABLE_YARR_JIT typedef JSC::Yarr::BytecodePattern BytecodePattern; @@ -217,25 +308,25 @@ /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */ YarrCodeBlock codeBlock; -- BytecodePattern *byteCode; ++#endif + BytecodePattern *byteCode; -#else - JSRegExp *compiled; - #endif -+ BytecodePattern *byteCode; +-#endif public: - RegExpPrivateCode() + RegExpCode() : #if ENABLE_YARR_JIT codeBlock(), -- byteCode(NULL) ++#endif + byteCode(NULL) -#else - compiled(NULL) - #endif -+ byteCode(NULL) +-#endif { } - ~RegExpPrivateCode() { + ~RegExpCode() { #if ENABLE_YARR_JIT codeBlock.release(); +#endif @@ -247,18 +338,26 @@ -#endif } + static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { +-#if ENABLE_YARR_JIT + ErrorCode error = JSC::Yarr::checkSyntax(*source); + if (error == JSC::Yarr::NoError) + return true; + + reportYarrError(cx, tokenStream, error); + return false; +-#else +-# error "Syntax checking not implemented for !ENABLE_YARR_JIT" +-#endif + } + #if ENABLE_YARR_JIT static inline bool isJITRuntimeEnabled(JSContext *cx); -- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); ++#endif + static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); -#else -- void reportPCREError(JSContext *cx, int error); - #endif -+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); - - inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, - RegExpFlag flags); -@@ -205,11 +194,7 @@ class RegExpPrivateCode - int *output, size_t outputCount); +- static void reportPCREError(JSContext *cx, int error); +-#endif static size_t getOutputSize(size_t pairCount) { -#if ENABLE_YARR_JIT @@ -267,13 +366,22 @@ - return pairCount * 3; /* Should be x2, but PCRE has... needs. */ -#endif } - }; + bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); + + + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t start, + int *output, size_t outputCount); diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h -index ac41d08..fb8eb86 100644 --- a/js/src/yarr/wtfbridge.h +++ b/js/src/yarr/wtfbridge.h -@@ -49,9 +49,7 @@ +@@ -44,19 +44,17 @@ + * WTF compatibility layer. This file provides various type and data + * definitions for use by Yarr. + */ + + #include "jsstr.h" #include "jsprvtd.h" #include "vm/String.h" #include "assembler/wtf/Platform.h" @@ -283,3 +391,8 @@ namespace JSC { namespace Yarr { + /* + * Basic type definitions. + */ + + typedef jschar UChar; ++++++ seamonkey-2.10.1-source.tar.bz2 -> seamonkey-2.11-source.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/seamonkey/seamonkey-2.10.1-source.tar.bz2 /work/SRC/openSUSE:Factory/.seamonkey.new/seamonkey-2.11-source.tar.bz2 differ: char 11, line 1 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org