summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-02-10 07:19:27 +0100
committerRemi Collet <fedora@famillecollet.com>2013-02-10 07:19:27 +0100
commit4566dc4bdffd84795c3842bd53cae9ca770c30d8 (patch)
treec9c9b7997a1077e41c74a4011325172521e0ebc6
parent7f9bc4c1cbc9be29c0e41ae24725a1491c10d7c1 (diff)
Thunderbird: sync with rawhide
-rw-r--r--mozilla-746112.patch86
-rw-r--r--mozilla-791626.patch46
-rw-r--r--thunderbird.spec14
3 files changed, 144 insertions, 2 deletions
diff --git a/mozilla-746112.patch b/mozilla-746112.patch
new file mode 100644
index 0000000..01f6e16
--- /dev/null
+++ b/mozilla-746112.patch
@@ -0,0 +1,86 @@
+diff -up xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h
+--- xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 2012-10-17 16:32:43.000000000 +0200
++++ xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h 2012-10-24 14:48:12.186640489 +0200
+@@ -103,26 +103,31 @@ struct Cell
+ };
+
+ /*
+- * Page size is 4096 by default, except for SPARC, where it is 8192.
++ * Page size must be static to support our arena pointer optimizations, so we
++ * are forced to support each platform with non-4096 pages as a special case.
++ * Note: The freelist supports a maximum arena shift of 15.
+ * Note: Do not use JS_CPU_SPARC here, this header is used outside JS.
+ * Bug 692267: Move page size definition to gc/Memory.h and include it
+ * directly once jsgc.h is no longer an installed header.
+ */
+ #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
+ const size_t PageShift = 13;
++const size_t ArenaShift = PageShift;
++#elif defined(__powerpc__)
++const size_t PageShift = 16;
++const size_t ArenaShift = 12;
+ #else
+ const size_t PageShift = 12;
++const size_t ArenaShift = PageShift;
+ #endif
+ const size_t PageSize = size_t(1) << PageShift;
++const size_t ArenaSize = size_t(1) << ArenaShift;
++const size_t ArenaMask = ArenaSize - 1;
+
+ const size_t ChunkShift = 20;
+ const size_t ChunkSize = size_t(1) << ChunkShift;
+ const size_t ChunkMask = ChunkSize - 1;
+
+-const size_t ArenaShift = PageShift;
+-const size_t ArenaSize = PageSize;
+-const size_t ArenaMask = ArenaSize - 1;
+-
+ /*
+ * This is the maximum number of arenas we allow in the FreeCommitted state
+ * before we trigger a GC_SHRINK to release free arenas to the OS.
+diff -up xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp
+--- xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 2012-10-17 16:32:44.000000000 +0200
++++ xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp 2012-10-24 14:46:28.253638095 +0200
+@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[]
+ sizeof(BackgroundPhaseStrings) / sizeof(AllocKind)
+ };
+
++/* Unused memory decommiting requires the arena size match the page size. */
++static bool
++DecommitEnabled()
++{
++ return PageSize == ArenaSize;
++}
++
+ #ifdef DEBUG
+ void
+ ArenaHeader::checkSynchronizedWithFreeList() const
+@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena()
+ decommittedArenas.unset(offset);
+
+ Arena *arena = &arenas[offset];
+- MarkPagesInUse(arena, ArenaSize);
++ if (DecommitEnabled())
++ MarkPagesInUse(arena, ArenaSize);
+ arena->aheader.setAsNotAllocated();
+
+ return &arena->aheader;
+@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntim
+ chunk->removeFromAvailableList();
+
+ size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress());
+- bool ok;
++ bool ok = true;
+ {
+ /*
+ * If the main thread waits for the decommit to finish, skip
+@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntim
+ Maybe<AutoUnlockGC> maybeUnlock;
+ if (!rt->isHeapBusy())
+ maybeUnlock.construct(rt);
+- ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
++ if (DecommitEnabled())
++ ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
+ }
+
+ if (ok) {
diff --git a/mozilla-791626.patch b/mozilla-791626.patch
new file mode 100644
index 0000000..c2e77ab
--- /dev/null
+++ b/mozilla-791626.patch
@@ -0,0 +1,46 @@
+# HG changeset patch
+# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4
+diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp
+--- a/netwerk/base/src/nsIOService.cpp
++++ b/netwerk/base/src/nsIOService.cpp
+@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch
+ if (NS_SUCCEEDED(rv)) {
+ if (mSocketTransportService)
+ mSocketTransportService->SetAutodialEnabled(enableAutodial);
+ }
+ }
+
+ if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) {
+ bool manage;
+- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF,
++ if (mNetworkLinkServiceInitialized &&
++ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF,
+ &manage)))
+ SetManageOfflineStatus(manage);
+ }
+
+ if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) {
+ int32_t count;
+ if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF,
+ &count)))
+@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec
+ }
+ else if (!strcmp(topic, kProfileDoChange)) {
+ if (data && NS_LITERAL_STRING("startup").Equals(data)) {
+ // Lazy initialization of network link service (see bug 620472)
+ InitializeNetworkLinkService();
+ // Set up the initilization flag regardless the actuall result.
+ // If we fail here, we will fail always on.
+ mNetworkLinkServiceInitialized = true;
++ // And now reflect the preference setting
++ nsCOMPtr<nsIPrefBranch> prefBranch;
++ GetPrefBranch(getter_AddRefs(prefBranch));
++ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF);
+ }
+ }
+ else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
+ // Remember we passed XPCOM shutdown notification to prevent any
+ // changes of the offline status from now. We must not allow going
+ // online after this point.
+ mShutdown = true;
+
diff --git a/thunderbird.spec b/thunderbird.spec
index 0885f5f..4ab6fce 100644
--- a/thunderbird.spec
+++ b/thunderbird.spec
@@ -60,7 +60,7 @@
Summary: Mozilla Thunderbird mail/newsgroup client
Name: thunderbird
Version: 17.0.2
-Release: 1%{?dist}
+Release: 3%{?dist}
URL: http://www.mozilla.org/projects/thunderbird/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
@@ -79,6 +79,7 @@ Source100: find-external-requires
# Mozilla (XULRunner) patches
Patch0: thunderbird-install-dir.patch
Patch8: xulrunner-10.0-secondary-ipc.patch
+Patch9: mozilla-791626.patch
# Build patches
Patch104: xulrunner-10.0-gcc47.patch
@@ -89,6 +90,7 @@ Patch200: thunderbird-8.0-enable-addons.patch
# PPC fixes
Patch300: xulrunner-16.0-jemalloc-ppc.patch
Patch301: rhbz-855923.patch
+Patch302: mozilla-746112.patch
%if %{official_branding}
# Required by Mozilla Corporation
@@ -195,7 +197,9 @@ cd %{tarballdir}
# Mozilla (XULRunner) patches
cd mozilla
%patch8 -p3 -b .secondary-ipc
+%patch9 -p1 -b .791626
%patch104 -p1 -b .gcc47
+%patch302 -p2 -b .746112
cd ..
%patch200 -p1 -b .addons
@@ -300,7 +304,7 @@ export LIBDIR='%{_libdir}'
MOZ_SMP_FLAGS=-j1
# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel,
# however builds tend to fail on other arches when building in parallel.
-%ifarch %{ix86} x86_64
+%ifarch %{ix86} x86_64 ppc ppc64
[ -z "$RPM_BUILD_NCPUS" ] && \
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
@@ -501,6 +505,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#===============================================================================
%changelog
+* Tue Jan 15 2013 Martin Stransky <stransky@redhat.com> - 17.0.2-3
+- Added fix for NM regression (mozbz#791626)
+
+* Tue Jan 15 2013 Jan Horak <jhorak@redhat.com> - 17.0.2-2
+- Added mozilla-746112 patch to fix crash on ppc(64)
+
* Thu Jan 10 2013 Remi Collet <RPMS@FamilleCollet.com> - 17.0.2-1
- Sync with rawhide, update to 17.0.2