Update to 10.0

This commit is contained in:
Jan Horak 2012-01-31 12:47:29 +01:00
parent 25fc0e07f1
commit 7bace115d1
8 changed files with 50 additions and 534 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ thunderbird-langpacks-3.1.2-20100803.tar.bz2
/thunderbird-9.0.source.tar.bz2 /thunderbird-9.0.source.tar.bz2
/thunderbird-langpacks-9.0-20111220.tar.xz /thunderbird-langpacks-9.0-20111220.tar.xz
/thunderbird-langpacks-9.0-20111222.tar.xz /thunderbird-langpacks-9.0-20111222.tar.xz
/thunderbird-10.0.source.tar.bz2
/thunderbird-langpacks-10.0-20120131.tar.xz

View File

@ -1,133 +0,0 @@
diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp
--- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp.696393 2011-12-07 07:28:08.000000000 +0100
+++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp 2011-12-09 15:06:10.584998410 +0100
@@ -200,52 +200,21 @@ invoke_copy_to_stack(PRUint32 paramCount
}
}
+typedef nsresult (*vtable_func)(nsISupports *, PRUint32, PRUint32, PRUint32, PRUint32, double, double);
+
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
- PRUint32 *vtable = *(PRUint32 **)that;
- PRUint32 method = vtable[methodIndex];
+ vtable_func *vtable = *reinterpret_cast<vtable_func **>(that);
+ vtable_func method = vtable[methodIndex];
PRUint32 overflow = invoke_count_words (paramCount, params);
- PRUint32 result;
-
- __asm__ __volatile__
- (
- "lr 7,15\n\t"
- "ahi 7,-32\n\t"
-
- "lr 3,%3\n\t"
- "sll 3,2\n\t"
- "lcr 3,3\n\t"
- "l 2,0(15)\n\t"
- "la 15,0(3,7)\n\t"
- "st 2,0(15)\n\t"
+ PRUint32 *stack_space = reinterpret_cast<PRUint32 *>(__builtin_alloca((overflow + 8 /* 4 32-bits gpr + 2 64-bits fpr */) * 4));
- "lr 2,%1\n\t"
- "lr 3,%2\n\t"
- "la 4,96(15)\n\t"
- "lr 5,%3\n\t"
- "basr 14,%4\n\t"
+ invoke_copy_to_stack(paramCount, params, stack_space, overflow);
- "lr 2,%5\n\t"
- "ld 0,112(7)\n\t"
- "ld 2,120(7)\n\t"
- "lm 3,6,96(7)\n\t"
- "basr 14,%6\n\t"
+ PRUint32 *d_gpr = stack_space + overflow;
+ double *d_fpr = reinterpret_cast<double *>(d_gpr + 4);
- "la 15,32(7)\n\t"
-
- "lr %0,2\n\t"
- : "=r" (result)
- : "r" (paramCount),
- "r" (params),
- "r" (overflow),
- "a" (invoke_copy_to_stack),
- "a" (that),
- "a" (method)
- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", "%f0", "%f2"
- );
-
- return result;
+ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1]);
}
-
diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
--- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-12-07 07:28:08.000000000 +0100
+++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-09 15:07:07.609097348 +0100
@@ -194,55 +194,22 @@ invoke_copy_to_stack(PRUint32 paramCount
}
}
+typedef nsresult (*vtable_func)(nsISupports *, PRUint64, PRUint64, PRUint64, PRUint64, double, double, double, double);
+
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
- PRUint64 *vtable = *(PRUint64 **)that;
- PRUint64 method = vtable[methodIndex];
+ vtable_func *vtable = *reinterpret_cast<vtable_func **>(that);
+ vtable_func method = vtable[methodIndex];
PRUint64 overflow = invoke_count_words (paramCount, params);
+ PRUint64 *stack_space = reinterpret_cast<PRUint64 *>(__builtin_alloca((overflow + 8 /* 4 64-bits gpr + 4 64-bits fpr */) * 8));
PRUint64 result;
- __asm__ __volatile__
- (
- "lgr 7,15\n\t"
- "aghi 7,-64\n\t"
-
- "lgr 3,%3\n\t"
- "sllg 3,3,3\n\t"
- "lcgr 3,3\n\t"
- "lg 2,0(15)\n\t"
- "la 15,0(3,7)\n\t"
- "stg 2,0(15)\n\t"
-
- "lgr 2,%1\n\t"
- "lgr 3,%2\n\t"
- "la 4,160(15)\n\t"
- "lgr 5,%3\n\t"
- "basr 14,%4\n\t"
+ invoke_copy_to_stack(paramCount, params, stack_space, overflow);
- "lgr 2,%5\n\t"
- "ld 0,192(7)\n\t"
- "ld 2,200(7)\n\t"
- "ld 4,208(7)\n\t"
- "ld 6,216(7)\n\t"
- "lmg 3,6,160(7)\n\t"
- "basr 14,%6\n\t"
+ PRUint64 *d_gpr = stack_space + overflow;
+ double *d_fpr = reinterpret_cast<double *>(d_gpr + 4);
- "la 15,64(7)\n\t"
-
- "lgr %0,2\n\t"
- : "=r" (result)
- : "r" ((PRUint64)paramCount),
- "r" (params),
- "r" (overflow),
- "a" (invoke_copy_to_stack),
- "a" (that),
- "a" (method)
- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory",
- "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"
- );
-
- return result;
+ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1], d_fpr[2], d_fpr[3]);
}
-

View File

@ -1,2 +1,2 @@
681bdf6362945b59b2bec23f8aecc7e7 thunderbird-9.0.source.tar.bz2 6f76f25894ba746a2e33614d3dd8dbab thunderbird-10.0.source.tar.bz2
2d8cd90da4a6808b91a0eba00596edbf thunderbird-langpacks-9.0-20111222.tar.xz 2bc212221f678b3924b3187482bb73ab thunderbird-langpacks-10.0-20120131.tar.xz

View File

@ -32,8 +32,8 @@
Summary: Mozilla Thunderbird mail/newsgroup client Summary: Mozilla Thunderbird mail/newsgroup client
Name: thunderbird Name: thunderbird
Version: 9.0 Version: 10.0
Release: 7%{?dist} Release: 1%{?dist}
URL: http://www.mozilla.org/projects/thunderbird/ URL: http://www.mozilla.org/projects/thunderbird/
License: MPLv1.1 or GPLv2+ or LGPLv2+ License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet Group: Applications/Internet
@ -44,7 +44,7 @@ Group: Applications/Internet
%endif %endif
Source0: %{tarball} Source0: %{tarball}
%if %{build_langpacks} %if %{build_langpacks}
Source1: thunderbird-langpacks-%{version}-20111222.tar.xz Source1: thunderbird-langpacks-%{version}-20120131.tar.xz
%endif %endif
Source10: thunderbird-mozconfig Source10: thunderbird-mozconfig
Source11: thunderbird-mozconfig-branded Source11: thunderbird-mozconfig-branded
@ -57,10 +57,7 @@ Source100: find-external-requires
# Mozilla (XULRunner) patches # Mozilla (XULRunner) patches
Patch0: thunderbird-install-dir.patch Patch0: thunderbird-install-dir.patch
Patch7: crashreporter-remove-static.patch Patch7: crashreporter-remove-static.patch
Patch8: xulrunner-9.0-secondary-ipc.patch Patch8: xulrunner-10.0-secondary-ipc.patch
Patch10: xulrunner-2.0-network-link-service.patch
Patch11: xulrunner-2.0-NetworkManager09.patch
Patch12: mozilla-696393.patch
# # cherry-picked from 13afcd4c097c # # cherry-picked from 13afcd4c097c
Patch13: xulrunner-9.0-secondary-build-fix.patch Patch13: xulrunner-9.0-secondary-build-fix.patch
@ -149,10 +146,7 @@ cd %{tarballdir}
# Mozilla (XULRunner) patches # Mozilla (XULRunner) patches
cd mozilla cd mozilla
%patch7 -p2 -b .static %patch7 -p2 -b .static
%patch8 -p2 -b .secondary-ipc %patch8 -p3 -b .secondary-ipc
%patch10 -p1 -b .link-service
%patch11 -p1 -b .NetworkManager09
%patch12 -p2 -b .696393
%patch13 -p2 -b .secondary-build %patch13 -p2 -b .secondary-build
cd .. cd ..
@ -334,7 +328,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/components/binary.manifest %{mozappdir}/components/binary.manifest
%{mozappdir}/components/libdbusservice.so %{mozappdir}/components/libdbusservice.so
%{mozappdir}/components/libmozgnome.so %{mozappdir}/components/libmozgnome.so
%{mozappdir}/omni.jar %{mozappdir}/omni.ja
%{mozappdir}/plugin-container %{mozappdir}/plugin-container
%{mozappdir}/defaults %{mozappdir}/defaults
%{mozappdir}/dictionaries %{mozappdir}/dictionaries
@ -358,7 +352,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/256x256/apps/thunderbird.png %{_datadir}/icons/hicolor/256x256/apps/thunderbird.png
%{_datadir}/icons/hicolor/32x32/apps/thunderbird.png %{_datadir}/icons/hicolor/32x32/apps/thunderbird.png
%{_datadir}/icons/hicolor/48x48/apps/thunderbird.png %{_datadir}/icons/hicolor/48x48/apps/thunderbird.png
%{mozappdir}/hyphenation
%if %{enable_mozilla_crashreporter} %if %{enable_mozilla_crashreporter}
%{mozappdir}/crashreporter %{mozappdir}/crashreporter
%{mozappdir}/crashreporter.ini %{mozappdir}/crashreporter.ini
@ -368,11 +361,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%exclude %{_includedir}/%{name}-%{version} %exclude %{_includedir}/%{name}-%{version}
%exclude %{_libdir}/%{name}-devel-%{version} %exclude %{_libdir}/%{name}-devel-%{version}
%{mozappdir}/chrome.manifest %{mozappdir}/chrome.manifest
%{mozappdir}/distribution/extensions %{mozappdir}/searchplugins
#=============================================================================== #===============================================================================
%changelog %changelog
* Tue Jan 31 2012 Jan Horak <jhorak@redhat.com> - 10.0-1
- Update to 10.0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.0-7 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

View File

@ -0,0 +1,36 @@
diff -up thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/base/data_pack.cc.secondary-ipc thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/base/data_pack.cc
--- thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2012-01-29 15:44:23.000000000 +0100
+++ thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/base/data_pack.cc 2012-01-31 10:45:57.784248018 +0100
@@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path
bool DataPack::Get(uint32_t resource_id, StringPiece* data) {
// It won't be hard to make this endian-agnostic, but it's not worth
// bothering to do right now.
-#if defined(__BYTE_ORDER)
- // Linux check
- COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN,
- datapack_assumes_little_endian);
-#elif defined(__BIG_ENDIAN__)
- // Mac check
- #error DataPack assumes little endian
-#endif
+#warning DoTheRightThingMakingThisEndianAgnostic!
DataPackEntry* target = reinterpret_cast<DataPackEntry*>(
bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_,
diff -up thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/build/build_config.h.secondary-ipc thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/build/build_config.h
--- thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/build/build_config.h.secondary-ipc 2012-01-29 15:44:23.000000000 +0100
+++ thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/build/build_config.h 2012-01-31 10:53:24.409935119 +0100
@@ -65,10 +65,10 @@
#elif defined(__ppc__) || defined(__powerpc__)
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
-#elif defined(__sparc64__)
+#elif defined(__sparc__) && !defined(__arch64)
#define ARCH_CPU_SPARC 1
#define ARCH_CPU_64_BITS 1
-#elif defined(__sparc__)
+#elif defined(__sparc__) && defined(__arch64)
#define ARCH_CPU_SPARC 1
#define ARCH_CPU_32_BITS 1
#elif defined(__mips__)
diff -up thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc thunderbird-10.0/comm-release/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h

View File

@ -1,51 +0,0 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=639959
--- source/toolkit/system/dbus/nsNetworkManagerListener.cpp.foo 2011-03-08 14:26:28.167074923 -0600
+++ source/toolkit/system/dbus/nsNetworkManagerListener.cpp 2011-03-08 14:30:54.260748294 -0600
@@ -51,15 +51,13 @@
#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
-#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange"
-typedef enum NMState
-{
- NM_STATE_UNKNOWN = 0,
- NM_STATE_ASLEEP,
- NM_STATE_CONNECTING,
- NM_STATE_CONNECTED,
- NM_STATE_DISCONNECTED
-} NMState;
+#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" /* Deprecated in 0.7.x */
+#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged"
+
+#define NM_STATE_CONNECTED_OLD 3
+#define NM_STATE_CONNECTED_LOCAL 50
+#define NM_STATE_CONNECTED_SITE 60
+#define NM_STATE_CONNECTED_GLOBAL 70
nsNetworkManagerListener::nsNetworkManagerListener() :
mLinkUp(PR_TRUE), mNetworkManagerActive(PR_FALSE),
@@ -174,7 +172,9 @@
PRBool
nsNetworkManagerListener::HandleMessage(DBusMessage* message) {
if (dbus_message_is_signal(message, NM_DBUS_INTERFACE,
- NM_DBUS_SIGNAL_STATE_CHANGE)) {
+ NM_DBUS_SIGNAL_STATE_CHANGE) ||
+ dbus_message_is_signal(message, NM_DBUS_INTERFACE,
+ NM_DBUS_SIGNAL_STATE_CHANGED)) {
UpdateNetworkStatus(message);
return PR_TRUE;
}
@@ -191,7 +191,10 @@
mNetworkManagerActive = PR_TRUE;
PRBool wasUp = mLinkUp;
- mLinkUp = result == NM_STATE_CONNECTED;
+ mLinkUp = (result == NM_STATE_CONNECTED_OLD) ||
+ (result == NM_STATE_CONNECTED_LOCAL) ||
+ (result == NM_STATE_CONNECTED_SITE) ||
+ (result == NM_STATE_CONNECTED_GLOBAL);
if (wasUp == mLinkUp)
return;

View File

@ -1,274 +0,0 @@
# HG changeset patch
# Parent 31879b88cc82c1f44e6a6c25a05aa2c70af22d7e
# User Martin Stransky <stransky@redhat.com>
Bug 627672 - XPCOM component (libdbusservice.so) is not registered although it should be; r=cbiesinger
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
@@ -160,31 +160,33 @@ PRInt16 gBadPortList[] = {
2049, // nfs
4045, // lockd
6000, // x11
0, // This MUST be zero so that we can populating the array
};
static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown";
static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore";
+static const char kStartupTopic[] = "profile-after-change";
// Necko buffer cache
nsIMemory* nsIOService::gBufferCache = nsnull;
PRUint32 nsIOService::gDefaultSegmentSize = 4096;
PRUint32 nsIOService::gDefaultSegmentCount = 24;
////////////////////////////////////////////////////////////////////////////////
nsIOService::nsIOService()
: mOffline(PR_TRUE)
, mOfflineForProfileChange(PR_FALSE)
, mManageOfflineStatus(PR_TRUE)
, mSettingOffline(PR_FALSE)
, mSetOfflineValue(PR_FALSE)
, mShutdown(PR_FALSE)
+ , mNetworkLinkServiceInitialized(PR_FALSE)
, mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY)
, mContentSniffers(NS_CONTENT_SNIFFER_CATEGORY)
, mAutoDialEnabled(PR_FALSE)
{
}
nsresult
nsIOService::Init()
@@ -230,16 +232,17 @@ nsIOService::Init()
}
// Register for profile change notifications
nsCOMPtr<nsIObserverService> observerService =
mozilla::services::GetObserverService();
if (observerService) {
observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE);
observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE);
+ observerService->AddObserver(this, kStartupTopic, PR_TRUE);
observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE);
observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE);
}
else
NS_WARNING("failed to get observer service");
NS_TIME_FUNCTION_MARK("Registered observers");
@@ -258,29 +261,19 @@ nsIOService::Init()
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache.");
CallQueryInterface(recyclingAllocator, &gBufferCache);
}
NS_TIME_FUNCTION_MARK("Set up the recycling allocator");
gIOService = this;
- // go into managed mode if we can, and chrome process
- if (XRE_GetProcessType() == GeckoProcessType_Default)
- mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID);
-
- if (!mNetworkLinkService)
- // We can't really determine if the machine has a usable network connection,
- // so let's cross our fingers!
- mManageOfflineStatus = PR_FALSE;
-
- if (mManageOfflineStatus)
- TrackNetworkLinkStatusForOffline();
- else
- SetOffline(PR_FALSE);
+ // We can't really determine if the machine has a usable network connection,
+ // (mNetworkLinkService will be initialized later) so let's cross our fingers!
+ SetOffline(PR_FALSE);
NS_TIME_FUNCTION_MARK("Set up network link service");
return NS_OK;
}
nsIOService::~nsIOService()
@@ -306,16 +299,57 @@ nsIOService::InitializeSocketTransportSe
rv = mSocketTransportService->Init();
NS_ASSERTION(NS_SUCCEEDED(rv), "socket transport service init failed");
mSocketTransportService->SetAutodialEnabled(mAutoDialEnabled);
}
return rv;
}
+nsresult
+nsIOService::InitializeNetworkLinkService()
+{
+ NS_TIME_FUNCTION;
+
+ nsresult rv = NS_OK;
+
+ if (mNetworkLinkServiceInitialized)
+ return rv;
+
+#if defined(MOZ_PLATFORM_MAEMO)
+ // libdbusservice fails to initialize on Maemo platform, see Bug 627672
+ mNetworkLinkService = NULL;
+#else
+ // go into managed mode if we can, and chrome process
+ if (XRE_GetProcessType() == GeckoProcessType_Default)
+ {
+ mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID, &rv);
+ if (NS_FAILED(rv)) {
+ NS_WARNING("failed to get network link service");
+ return rv;
+ }
+ }
+#endif
+
+ mNetworkLinkServiceInitialized = PR_TRUE;
+
+ if (!mNetworkLinkService) {
+ // We can't really determine if the machine has a usable network connection,
+ // so let's cross our fingers!
+ mManageOfflineStatus = PR_FALSE;
+ }
+
+ if (mManageOfflineStatus)
+ TrackNetworkLinkStatusForOffline();
+ else
+ SetOffline(PR_FALSE);
+
+ return rv;
+}
+
nsIOService*
nsIOService::GetInstance() {
if (!gIOService) {
gIOService = new nsIOService();
if (!gIOService)
return nsnull;
NS_ADDREF(gIOService);
@@ -689,16 +723,19 @@ nsIOService::NewChannel(const nsACString
if (NS_FAILED(rv)) return rv;
return NewChannelFromURI(uri, result);
}
PRBool
nsIOService::IsLinkUp()
{
+ NS_ASSERTION(mNetworkLinkServiceInitialized,
+ "network link service should be initialized");
+
if (!mNetworkLinkService) {
// We cannot decide, assume the link is up
return PR_TRUE;
}
PRBool isLinkUp;
nsresult rv;
rv = mNetworkLinkService->GetIsLinkUp(&isLinkUp);
@@ -968,16 +1005,20 @@ nsIOService::Observe(nsISupports *subjec
if (mOfflineForProfileChange) {
mOfflineForProfileChange = PR_FALSE;
if (!mManageOfflineStatus ||
NS_FAILED(TrackNetworkLinkStatusForOffline())) {
SetOffline(PR_FALSE);
}
}
}
+ else if (!strcmp(topic, kStartupTopic)) {
+ // Lazy initialization of network link service (see bug 620472)
+ InitializeNetworkLinkService();
+ }
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 = PR_TRUE;
SetOffline(PR_TRUE);
@@ -1085,32 +1126,40 @@ nsIOService::NewSimpleNestedURI(nsIURI*
NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI));
return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsIOService::SetManageOfflineStatus(PRBool aManage) {
PRBool wasManaged = mManageOfflineStatus;
mManageOfflineStatus = aManage;
+
+ if (!mNetworkLinkServiceInitialized) {
+ InitializeNetworkLinkService();
+ }
+
if (mManageOfflineStatus && !wasManaged)
return TrackNetworkLinkStatusForOffline();
return NS_OK;
}
NS_IMETHODIMP
nsIOService::GetManageOfflineStatus(PRBool* aManage) {
*aManage = mManageOfflineStatus;
return NS_OK;
}
nsresult
nsIOService::TrackNetworkLinkStatusForOffline()
{
NS_ASSERTION(mManageOfflineStatus,
"Don't call this unless we're managing the offline status");
+ NS_ASSERTION(mNetworkLinkServiceInitialized,
+ "network link service should be set up");
+
if (!mNetworkLinkService)
return NS_ERROR_FAILURE;
if (mShutdown)
return NS_ERROR_NOT_AVAILABLE;
// check to make sure this won't collide with Autodial
if (mSocketTransportService) {
diff --git a/netwerk/base/src/nsIOService.h b/netwerk/base/src/nsIOService.h
--- a/netwerk/base/src/nsIOService.h
+++ b/netwerk/base/src/nsIOService.h
@@ -129,16 +129,17 @@ private:
nsIProtocolHandler* hdlr);
// Prefs wrangling
NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull);
NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **);
NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove);
nsresult InitializeSocketTransportService();
+ nsresult InitializeNetworkLinkService();
private:
PRPackedBool mOffline;
PRPackedBool mOfflineForProfileChange;
PRPackedBool mManageOfflineStatus;
// Used to handle SetOffline() reentrancy. See the comment in
// SetOffline() for more details.
@@ -146,16 +147,17 @@ private:
PRPackedBool mSetOfflineValue;
PRPackedBool mShutdown;
nsCOMPtr<nsPISocketTransportService> mSocketTransportService;
nsCOMPtr<nsPIDNSService> mDNSService;
nsCOMPtr<nsIProtocolProxyService2> mProxyService;
nsCOMPtr<nsINetworkLinkService> mNetworkLinkService;
+ PRPackedBool mNetworkLinkServiceInitialized;
// Cached protocol handlers
nsWeakPtr mWeakHandler[NS_N(gScheme)];
// cached categories
nsCategoryCache<nsIChannelEventSink> mChannelEventSinks;
nsCategoryCache<nsIContentSniffer> mContentSniffers;

View File

@ -1,60 +0,0 @@
diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc
--- xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-12-07 07:27:43.000000000 +0100
+++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/base/data_pack.cc 2011-12-09 14:35:50.397220865 +0100
@@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path
bool DataPack::Get(uint32_t resource_id, StringPiece* data) {
// It won't be hard to make this endian-agnostic, but it's not worth
// bothering to do right now.
-#if defined(__BYTE_ORDER)
- // Linux check
- COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN,
- datapack_assumes_little_endian);
-#elif defined(__BIG_ENDIAN__)
- // Mac check
- #error DataPack assumes little endian
-#endif
+#warning DoTheRightThingMakingThisEndianAgnostic!
DataPackEntry* target = reinterpret_cast<DataPackEntry*>(
bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_,
diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h
--- xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-12-07 07:27:43.000000000 +0100
+++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/build/build_config.h 2011-12-09 14:39:44.922231601 +0100
@@ -59,11 +59,23 @@
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
#define WCHAR_T_IS_UNSIGNED 1
+#elif defined(__powerpc64__)
+#define ARCH_CPU_PPC64 1
+#define ARCH_CPU_64_BITS 1
#elif defined(__ppc__) || defined(__powerpc__)
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
-#elif defined(__sparc64__)
+#elif defined(__s390x__)
+#define ARCH_CPU_S390X 1
+#define ARCH_CPU_64_BITS 1
+#elif defined(__s390__)
+#define ARCH_CPU_S390 1
+#define ARCH_CPU_32_BITS 1
+#elif defined(__sparc__) && !defined(__arch64)
#define ARCH_CPU_SPARC 1
+#define ARCH_CPU_32_BITS 1
+#elif defined(__sparc__) && defined(__arch64)
+#define ARCH_CPU_SPARC64 1
#define ARCH_CPU_64_BITS 1
#else
#error Please add support for your architecture in build/build_config.h
diff -up xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h
--- xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-12-07 07:27:43.000000000 +0100
+++ xulrunner-9.0/mozilla-beta/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-12-09 14:40:59.602679278 +0100
@@ -195,7 +195,8 @@ struct ParamTraits<unsigned long long> {
};
#endif
-#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
+// Although s390 is a 32-bit system it defines size_t as unsigned long
+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390))))
// There size_t is a synonym for |unsigned long| ...
template <>
struct ParamTraits<size_t> {