Update to 11.0
This commit is contained in:
parent
77b7e90b8d
commit
26ed967f16
2
.gitignore
vendored
2
.gitignore
vendored
@ -37,3 +37,5 @@ thunderbird-langpacks-3.1.2-20100803.tar.bz2
|
|||||||
/thunderbird-langpacks-10.0-20120131.tar.xz
|
/thunderbird-langpacks-10.0-20120131.tar.xz
|
||||||
/thunderbird-10.0.1.source.tar.bz2
|
/thunderbird-10.0.1.source.tar.bz2
|
||||||
/thunderbird-langpacks-10.0.1-20120209.tar.xz
|
/thunderbird-langpacks-10.0.1-20120209.tar.xz
|
||||||
|
/thunderbird-11.0.source.tar.bz2
|
||||||
|
/thunderbird-langpacks-11.0-20120313.tar.xz
|
||||||
|
@ -1,358 +0,0 @@
|
|||||||
diff -up xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp
|
|
||||||
--- xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 2012-01-18 17:25:24.000000000 +0100
|
|
||||||
+++ xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp 2012-01-23 15:40:14.803170842 +0100
|
|
||||||
@@ -44,6 +44,8 @@
|
|
||||||
#include "nsMemory.h"
|
|
||||||
#include "prlink.h"
|
|
||||||
#include "nsComponentManagerUtils.h"
|
|
||||||
+#include "nsIMutableArray.h"
|
|
||||||
+#include "nsISupportsPrimitives.h"
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
#include <glib-object.h>
|
|
||||||
@@ -60,6 +62,7 @@ typedef struct _GVariant GVariant;
|
|
||||||
# define G_VARIANT_TYPE_STRING ((const GVariantType *) "s")
|
|
||||||
# define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o")
|
|
||||||
# define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g")
|
|
||||||
+# define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GSETTINGS_FUNCTIONS \
|
|
||||||
@@ -72,6 +75,7 @@ typedef struct _GVariant GVariant;
|
|
||||||
FUNC(g_variant_get_int32, gint32, (GVariant* variant)) \
|
|
||||||
FUNC(g_variant_get_boolean, gboolean, (GVariant* variant)) \
|
|
||||||
FUNC(g_variant_get_string, const char *, (GVariant* value, gsize* length)) \
|
|
||||||
+ FUNC(g_variant_get_strv, const char **, (GVariant* value, gsize* length)) \
|
|
||||||
FUNC(g_variant_is_of_type, gboolean, (GVariant* value, const GVariantType* type)) \
|
|
||||||
FUNC(g_variant_new_int32, GVariant *, (gint32 value)) \
|
|
||||||
FUNC(g_variant_new_boolean, GVariant *, (gboolean value)) \
|
|
||||||
@@ -95,6 +99,7 @@ GSETTINGS_FUNCTIONS
|
|
||||||
#define g_variant_get_int32 _g_variant_get_int32
|
|
||||||
#define g_variant_get_boolean _g_variant_get_boolean
|
|
||||||
#define g_variant_get_string _g_variant_get_string
|
|
||||||
+#define g_variant_get_strv _g_variant_get_strv
|
|
||||||
#define g_variant_is_of_type _g_variant_is_of_type
|
|
||||||
#define g_variant_new_int32 _g_variant_new_int32
|
|
||||||
#define g_variant_new_boolean _g_variant_new_boolean
|
|
||||||
@@ -267,6 +272,49 @@ nsGSettingsCollection::GetInt(const nsAC
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
+NS_IMETHODIMP
|
|
||||||
+nsGSettingsCollection::GetStringList(const nsACString& aKey, nsIArray** aResult)
|
|
||||||
+{
|
|
||||||
+ if (!KeyExists(aKey))
|
|
||||||
+ return NS_ERROR_INVALID_ARG;
|
|
||||||
+
|
|
||||||
+ nsCOMPtr<nsIMutableArray> items(do_CreateInstance(NS_ARRAY_CONTRACTID));
|
|
||||||
+ if (!items) {
|
|
||||||
+ return NS_ERROR_OUT_OF_MEMORY;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ GVariant *value = g_settings_get_value(mSettings,
|
|
||||||
+ PromiseFlatCString(aKey).get());
|
|
||||||
+
|
|
||||||
+ if (!g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) {
|
|
||||||
+ g_variant_unref(value);
|
|
||||||
+ return NS_ERROR_FAILURE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ const gchar ** gs_strings = g_variant_get_strv(value, NULL);
|
|
||||||
+ if (!gs_strings) {
|
|
||||||
+ // empty array
|
|
||||||
+ NS_ADDREF(*aResult = items);
|
|
||||||
+ g_variant_unref(value);
|
|
||||||
+ return NS_OK;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ const gchar** p_gs_strings = gs_strings;
|
|
||||||
+ while (*p_gs_strings != NULL)
|
|
||||||
+ {
|
|
||||||
+ nsCOMPtr<nsISupportsCString> obj(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
|
|
||||||
+ if (obj) {
|
|
||||||
+ obj->SetData(nsDependentCString(*p_gs_strings));
|
|
||||||
+ items->AppendElement(obj, false);
|
|
||||||
+ }
|
|
||||||
+ p_gs_strings++;
|
|
||||||
+ }
|
|
||||||
+ g_free(gs_strings);
|
|
||||||
+ NS_ADDREF(*aResult = items);
|
|
||||||
+ g_variant_unref(value);
|
|
||||||
+ return NS_OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
// These types are local to nsGSettingsService::Init, but ISO C++98 doesn't
|
|
||||||
// allow a template (ArrayLength) to be instantiated based on a local type.
|
|
||||||
// Boo-urns!
|
|
||||||
diff -up xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
|
||||||
--- xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 2012-01-18 17:25:24.000000000 +0100
|
|
||||||
+++ xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2012-01-23 15:39:23.083172529 +0100
|
|
||||||
@@ -49,6 +49,7 @@
|
|
||||||
#include "nsPrintfCString.h"
|
|
||||||
#include "nsNetUtil.h"
|
|
||||||
#include "nsISupportsPrimitives.h"
|
|
||||||
+#include "nsIGSettingsService.h"
|
|
||||||
|
|
||||||
class nsUnixSystemProxySettings : public nsISystemProxySettings {
|
|
||||||
public:
|
|
||||||
@@ -62,9 +63,12 @@ private:
|
|
||||||
~nsUnixSystemProxySettings() {}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIGConfService> mGConf;
|
|
||||||
+ nsCOMPtr<nsIGSettingsService> mGSettings;
|
|
||||||
bool IsProxyMode(const char* aMode);
|
|
||||||
nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
|
|
||||||
nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
|
|
||||||
+ nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
|
|
||||||
+ nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
|
|
||||||
@@ -73,6 +77,7 @@ nsresult
|
|
||||||
nsUnixSystemProxySettings::Init()
|
|
||||||
{
|
|
||||||
mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
|
||||||
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -87,14 +92,31 @@ nsUnixSystemProxySettings::IsProxyMode(c
|
|
||||||
nsresult
|
|
||||||
nsUnixSystemProxySettings::GetPACURI(nsACString& aResult)
|
|
||||||
{
|
|
||||||
- if (!mGConf || !IsProxyMode("auto")) {
|
|
||||||
- // Return an empty string in this case
|
|
||||||
- aResult.Truncate();
|
|
||||||
- return NS_OK;
|
|
||||||
+ if (mGSettings) {
|
|
||||||
+ nsCOMPtr<nsIGSettingsCollection> proxy_settings;
|
|
||||||
+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
|
|
||||||
+ getter_AddRefs(proxy_settings));
|
|
||||||
+ if (proxy_settings) {
|
|
||||||
+ nsCString proxyMode;
|
|
||||||
+ // Check if mode is auto
|
|
||||||
+ nsresult rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode);
|
|
||||||
+ if (rv == NS_OK && proxyMode.Equals("auto")) {
|
|
||||||
+ return proxy_settings->GetString(NS_LITERAL_CSTRING("autoconfig-url"), aResult);
|
|
||||||
+ }
|
|
||||||
+ /* The org.gnome.system.proxy schema has been found, but auto mode is not set.
|
|
||||||
+ * Don't try the GConf and return empty string. */
|
|
||||||
+ aResult.Truncate();
|
|
||||||
+ return NS_OK;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
- return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
|
|
||||||
- aResult);
|
|
||||||
+ if (mGConf && IsProxyMode("auto")) {
|
|
||||||
+ return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
|
|
||||||
+ aResult);
|
|
||||||
+ }
|
|
||||||
+ // Return an empty string when auto mode is not set.
|
|
||||||
+ aResult.Truncate();
|
|
||||||
+ return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
|
||||||
@@ -231,7 +253,38 @@ nsUnixSystemProxySettings::SetProxyResul
|
|
||||||
PRInt32 port;
|
|
||||||
rv = mGConf->GetInt(portKey, &port);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
+
|
|
||||||
+ /* When port is 0, proxy is not considered as enabled even if host is set. */
|
|
||||||
+ if (port == 0)
|
|
||||||
+ return NS_ERROR_FAILURE;
|
|
||||||
+
|
|
||||||
+ SetProxyResult(aType, host, port, aResult);
|
|
||||||
+ return NS_OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+nsresult
|
|
||||||
+nsUnixSystemProxySettings::SetProxyResultFromGSettings(const char* aKeyBase, const char* aType,
|
|
||||||
+ nsACString& aResult)
|
|
||||||
+{
|
|
||||||
+ nsCOMPtr<nsIGSettingsCollection> proxy_settings;
|
|
||||||
+ nsresult rv = mGSettings->GetCollectionForSchema(nsDependentCString(aKeyBase),
|
|
||||||
+ getter_AddRefs(proxy_settings));
|
|
||||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
+
|
|
||||||
+ nsCAutoString host;
|
|
||||||
+ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("host"), host);
|
|
||||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
+ if (host.IsEmpty())
|
|
||||||
+ return NS_ERROR_FAILURE;
|
|
||||||
+
|
|
||||||
+ PRInt32 port;
|
|
||||||
+ rv = proxy_settings->GetInt(NS_LITERAL_CSTRING("port"), &port);
|
|
||||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
+ /* When port is 0, proxy is not considered as enabled even if host is set. */
|
|
||||||
+ if (port == 0)
|
|
||||||
+ return NS_ERROR_FAILURE;
|
|
||||||
+
|
|
||||||
SetProxyResult(aType, host, port, aResult);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
@@ -271,17 +324,17 @@ static bool ConvertToIPV6Addr(const nsAC
|
|
||||||
PRIPv6Addr* aAddr)
|
|
||||||
{
|
|
||||||
PRNetAddr addr;
|
|
||||||
+ // try to convert hostname to IP
|
|
||||||
if (PR_StringToNetAddr(PromiseFlatCString(aName).get(), &addr) != PR_SUCCESS)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
- PRIPv6Addr ipv6;
|
|
||||||
// convert parsed address to IPv6
|
|
||||||
if (addr.raw.family == PR_AF_INET) {
|
|
||||||
// convert to IPv4-mapped address
|
|
||||||
- PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &ipv6);
|
|
||||||
+ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, aAddr);
|
|
||||||
} else if (addr.raw.family == PR_AF_INET6) {
|
|
||||||
// copy the address
|
|
||||||
- memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr));
|
|
||||||
+ memcpy(aAddr, &addr.ipv6.ip, sizeof(PRIPv6Addr));
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -289,8 +342,8 @@ static bool ConvertToIPV6Addr(const nsAC
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static bool GConfIgnoreHost(const nsACString& aIgnore,
|
|
||||||
- const nsACString& aHost)
|
|
||||||
+static bool HostIgnoredByProxy(const nsACString& aIgnore,
|
|
||||||
+ const nsACString& aHost)
|
|
||||||
{
|
|
||||||
if (aIgnore.Equals(aHost, nsCaseInsensitiveCStringComparator()))
|
|
||||||
return true;
|
|
||||||
@@ -321,8 +374,9 @@ static bool GConfIgnoreHost(const nsACSt
|
|
||||||
slash = end;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ nsDependentCSubstring ignoreStripped(start, slash);
|
|
||||||
PRIPv6Addr ignoreAddr, hostAddr;
|
|
||||||
- if (!ConvertToIPV6Addr(aIgnore, &ignoreAddr) ||
|
|
||||||
+ if (!ConvertToIPV6Addr(ignoreStripped, &ignoreAddr) ||
|
|
||||||
!ConvertToIPV6Addr(aHost, &hostAddr))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
@@ -355,7 +409,7 @@ nsUnixSystemProxySettings::GetProxyFromG
|
|
||||||
if (str) {
|
|
||||||
nsAutoString s;
|
|
||||||
if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
|
|
||||||
- if (GConfIgnoreHost(NS_ConvertUTF16toUTF8(s), aHost)) {
|
|
||||||
+ if (HostIgnoredByProxy(NS_ConvertUTF16toUTF8(s), aHost)) {
|
|
||||||
aResult.AppendLiteral("DIRECT");
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
@@ -392,6 +446,71 @@ nsUnixSystemProxySettings::GetProxyFromG
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
|
||||||
+nsUnixSystemProxySettings::GetProxyFromGSettings(const nsACString& aScheme,
|
|
||||||
+ const nsACString& aHost,
|
|
||||||
+ PRInt32 aPort,
|
|
||||||
+ nsACString& aResult)
|
|
||||||
+{
|
|
||||||
+ nsCOMPtr<nsIGSettingsCollection> proxy_settings;
|
|
||||||
+ nsresult rv;
|
|
||||||
+
|
|
||||||
+ rv = mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
|
|
||||||
+ getter_AddRefs(proxy_settings));
|
|
||||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
+
|
|
||||||
+ nsCString proxyMode;
|
|
||||||
+ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode);
|
|
||||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
+
|
|
||||||
+ if (!proxyMode.Equals("manual")) {
|
|
||||||
+ aResult.AppendLiteral("DIRECT");
|
|
||||||
+ return NS_OK;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ nsCOMPtr<nsIArray> ignoreList;
|
|
||||||
+ if (NS_SUCCEEDED(proxy_settings->GetStringList(NS_LITERAL_CSTRING("ignore-hosts"),
|
|
||||||
+ getter_AddRefs(ignoreList))) && ignoreList) {
|
|
||||||
+ PRUint32 len = 0;
|
|
||||||
+ ignoreList->GetLength(&len);
|
|
||||||
+ for (PRUint32 i = 0; i < len; ++i) {
|
|
||||||
+ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt(ignoreList, i);
|
|
||||||
+ if (str) {
|
|
||||||
+ nsCString s;
|
|
||||||
+ if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
|
|
||||||
+ if (HostIgnoredByProxy(s, aHost)) {
|
|
||||||
+ aResult.AppendLiteral("DIRECT");
|
|
||||||
+ return NS_OK;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (aScheme.LowerCaseEqualsLiteral("http")) {
|
|
||||||
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult);
|
|
||||||
+ } else if (aScheme.LowerCaseEqualsLiteral("https")) {
|
|
||||||
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.https", "PROXY", aResult);
|
|
||||||
+ /* Try to use HTTP proxy when HTTPS proxy is not explicitly defined */
|
|
||||||
+ if (rv != NS_OK)
|
|
||||||
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult);
|
|
||||||
+ } else if (aScheme.LowerCaseEqualsLiteral("ftp")) {
|
|
||||||
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.ftp", "PROXY", aResult);
|
|
||||||
+ } else {
|
|
||||||
+ rv = NS_ERROR_FAILURE;
|
|
||||||
+ }
|
|
||||||
+ if (rv != NS_OK) {
|
|
||||||
+ /* If proxy for scheme is not specified, use SOCKS proxy for all schemes */
|
|
||||||
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.socks", "SOCKS", aResult);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (NS_FAILED(rv)) {
|
|
||||||
+ aResult.AppendLiteral("DIRECT");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return NS_OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+nsresult
|
|
||||||
nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult)
|
|
||||||
{
|
|
||||||
nsCAutoString scheme;
|
|
||||||
@@ -406,10 +525,15 @@ nsUnixSystemProxySettings::GetProxyForUR
|
|
||||||
rv = aURI->GetPort(&port);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
- if (!mGConf)
|
|
||||||
- return GetProxyFromEnvironment(scheme, host, port, aResult);
|
|
||||||
+ if (mGSettings) {
|
|
||||||
+ rv = GetProxyFromGSettings(scheme, host, port, aResult);
|
|
||||||
+ if (rv == NS_OK)
|
|
||||||
+ return rv;
|
|
||||||
+ }
|
|
||||||
+ if (mGConf)
|
|
||||||
+ return GetProxyFromGConf(scheme, host, port, aResult);
|
|
||||||
|
|
||||||
- return GetProxyFromGConf(scheme, host, port, aResult);
|
|
||||||
+ return GetProxyFromEnvironment(scheme, host, port, aResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
|
|
||||||
diff -up xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl
|
|
||||||
--- xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 2012-01-18 17:25:28.000000000 +0100
|
|
||||||
+++ xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl 2012-01-23 15:32:29.890186340 +0100
|
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
#include "nsISupports.idl"
|
|
||||||
#include "nsIArray.idl"
|
|
||||||
|
|
||||||
-[scriptable, uuid(09637d3c-3c07-40b4-aff9-1d2a0f046f3c)]
|
|
||||||
+[scriptable, uuid(16d5b0ed-e756-4f1b-a8ce-9132e869acd8)]
|
|
||||||
interface nsIGSettingsCollection : nsISupports
|
|
||||||
{
|
|
||||||
void setString(in AUTF8String key, in AUTF8String value);
|
|
||||||
@@ -48,6 +48,7 @@ interface nsIGSettingsCollection : nsISu
|
|
||||||
AUTF8String getString(in AUTF8String key);
|
|
||||||
boolean getBoolean(in AUTF8String key);
|
|
||||||
long getInt(in AUTF8String key);
|
|
||||||
+ nsIArray getStringList(in AUTF8String key);
|
|
||||||
};
|
|
||||||
|
|
||||||
[scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)]
|
|
@ -1,38 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Benjamin Smedberg <benjamin@smedbergs.us>
|
|
||||||
# Date 1329314881 18000
|
|
||||||
# Node ID 355163c56ea5ad5037ac6da754252aaea67d2217
|
|
||||||
# Parent 81f6b9cbb2a92ac08d1ccc0c1b44d6a5c28f6e2a
|
|
||||||
Bug 727401 - import libpng overflow patch from http://codereview.chromium.org/9363013
|
|
||||||
|
|
||||||
diff --git a/media/libpng/pngrutil.c b/media/libpng/pngrutil.c
|
|
||||||
--- a/media/libpng/pngrutil.c
|
|
||||||
+++ b/media/libpng/pngrutil.c
|
|
||||||
@@ -396,18 +396,25 @@ png_decompress_chunk(png_structp png_ptr
|
|
||||||
#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
|
|
||||||
defined(PNG_USER_CHUNK_MALLOC_MAX)
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if (expanded_size > 0)
|
|
||||||
{
|
|
||||||
/* Success (maybe) - really uncompress the chunk. */
|
|
||||||
png_size_t new_size = 0;
|
|
||||||
- png_charp text = png_malloc_warn(png_ptr,
|
|
||||||
- prefix_size + expanded_size + 1);
|
|
||||||
+ png_charp text = NULL;
|
|
||||||
+ /* Need to check for both truncation (64-bit platforms) and integer
|
|
||||||
+ * overflow.
|
|
||||||
+ */
|
|
||||||
+ if (prefix_size + expanded_size > prefix_size &&
|
|
||||||
+ prefix_size + expanded_size < 0xffffffffU)
|
|
||||||
+ {
|
|
||||||
+ text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (text != NULL)
|
|
||||||
{
|
|
||||||
png_memcpy(text, png_ptr->chunkdata, prefix_size);
|
|
||||||
new_size = png_inflate(png_ptr,
|
|
||||||
(png_bytep)(png_ptr->chunkdata + prefix_size),
|
|
||||||
chunklength - prefix_size,
|
|
||||||
(png_bytep)(text + prefix_size), expanded_size);
|
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
623c32d9deae370383e1422b1ea48061 thunderbird-10.0.1.source.tar.bz2
|
1d7127a3282e62d95eb9b59d47291b70 thunderbird-11.0.source.tar.bz2
|
||||||
0c7c311278404805d33d35b2231aa20b thunderbird-langpacks-10.0.1-20120209.tar.xz
|
1cb665160a0d667da977cd9a9972497a thunderbird-langpacks-11.0-20120313.tar.xz
|
||||||
|
@ -13,9 +13,7 @@ ac_add_options --with-system-jpeg
|
|||||||
ac_add_options --with-system-zlib
|
ac_add_options --with-system-zlib
|
||||||
ac_add_options --with-pthreads
|
ac_add_options --with-pthreads
|
||||||
ac_add_options --disable-tests
|
ac_add_options --disable-tests
|
||||||
ac_add_options --disable-debug
|
|
||||||
ac_add_options --disable-installer
|
ac_add_options --disable-installer
|
||||||
ac_add_options --enable-optimize
|
|
||||||
ac_add_options --enable-xinerama
|
ac_add_options --enable-xinerama
|
||||||
ac_add_options --enable-default-toolkit=cairo-gtk2
|
ac_add_options --enable-default-toolkit=cairo-gtk2
|
||||||
ac_add_options --disable-xprint
|
ac_add_options --disable-xprint
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
%define nspr_version 4.8.9
|
# Build as a debug package?
|
||||||
%define nss_version 3.13.1
|
%define debug_build 0
|
||||||
%define cairo_version 1.8.8
|
|
||||||
%define freetype_version 2.1.9
|
|
||||||
%define sqlite_version 3.7.7.1
|
|
||||||
%define libnotify_version 0.4
|
|
||||||
%define build_langpacks 1
|
|
||||||
%define thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
|
|
||||||
|
|
||||||
%if 0%{?fedora} <= 15
|
%if 0%{?fedora} <= 15
|
||||||
%define system_sqlite 0
|
%define system_sqlite 0
|
||||||
@ -13,6 +7,17 @@
|
|||||||
%define system_sqlite 1
|
%define system_sqlite 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define build_langpacks 1
|
||||||
|
|
||||||
|
%define nspr_version 4.9
|
||||||
|
%define nss_version 3.13.3
|
||||||
|
%define cairo_version 1.8.8
|
||||||
|
%define freetype_version 2.1.9
|
||||||
|
%define sqlite_version 3.7.7.1
|
||||||
|
%define libnotify_version 0.4
|
||||||
|
|
||||||
|
%define thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
|
||||||
|
|
||||||
# The tarball is pretty inconsistent with directory structure.
|
# The tarball is pretty inconsistent with directory structure.
|
||||||
# Sometimes there is a top level directory. That goes here.
|
# Sometimes there is a top level directory. That goes here.
|
||||||
#
|
#
|
||||||
@ -32,8 +37,8 @@
|
|||||||
|
|
||||||
Summary: Mozilla Thunderbird mail/newsgroup client
|
Summary: Mozilla Thunderbird mail/newsgroup client
|
||||||
Name: thunderbird
|
Name: thunderbird
|
||||||
Version: 10.0.1
|
Version: 11.0
|
||||||
Release: 3%{?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
|
||||||
@ -58,10 +63,6 @@ Source100: find-external-requires
|
|||||||
Patch0: thunderbird-install-dir.patch
|
Patch0: thunderbird-install-dir.patch
|
||||||
Patch7: crashreporter-remove-static.patch
|
Patch7: crashreporter-remove-static.patch
|
||||||
Patch8: xulrunner-10.0-secondary-ipc.patch
|
Patch8: xulrunner-10.0-secondary-ipc.patch
|
||||||
# # cherry-picked from 13afcd4c097c
|
|
||||||
Patch13: xulrunner-9.0-secondary-build-fix.patch
|
|
||||||
Patch14: mozilla-727401.patch
|
|
||||||
Patch15: mozilla-682832-proxy.patch
|
|
||||||
|
|
||||||
# Build patches
|
# Build patches
|
||||||
Patch100: xulrunner-10.0-gcc47.patch
|
Patch100: xulrunner-10.0-gcc47.patch
|
||||||
@ -150,9 +151,6 @@ cd %{tarballdir}
|
|||||||
cd mozilla
|
cd mozilla
|
||||||
%patch7 -p2 -b .static
|
%patch7 -p2 -b .static
|
||||||
%patch8 -p3 -b .secondary-ipc
|
%patch8 -p3 -b .secondary-ipc
|
||||||
%patch13 -p2 -b .secondary-build
|
|
||||||
%patch14 -p1 -b .727401
|
|
||||||
%patch15 -p2 -b .682832
|
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora} >= 17
|
||||||
%patch100 -p1 -b .gcc47
|
%patch100 -p1 -b .gcc47
|
||||||
%endif
|
%endif
|
||||||
@ -188,6 +186,14 @@ echo "ac_add_options --enable-system-sqlite" >> .mozconfig
|
|||||||
echo "ac_add_options --disable-system-sqlite" >> .mozconfig
|
echo "ac_add_options --disable-system-sqlite" >> .mozconfig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{?debug_build}
|
||||||
|
echo "ac_add_options --enable-debug" >> .mozconfig
|
||||||
|
echo "ac_add_options --disable-optimize" >> .mozconfig
|
||||||
|
%else
|
||||||
|
echo "ac_add_options --disable-debug" >> .mozconfig
|
||||||
|
echo "ac_add_options --enable-optimize" >> .mozconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -202,6 +208,9 @@ cd %{tarballdir}
|
|||||||
#
|
#
|
||||||
MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \
|
MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \
|
||||||
%{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
|
%{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
|
||||||
|
%if %{?debug_build}
|
||||||
|
MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//')
|
||||||
|
%endif
|
||||||
export CFLAGS=$MOZ_OPT_FLAGS
|
export CFLAGS=$MOZ_OPT_FLAGS
|
||||||
export CXXFLAGS=$MOZ_OPT_FLAGS
|
export CXXFLAGS=$MOZ_OPT_FLAGS
|
||||||
|
|
||||||
@ -374,6 +383,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 13 2012 Martin Stransky <stransky@redhat.com> - 11.0-1
|
||||||
|
- Update to 11.0
|
||||||
|
|
||||||
* Thu Feb 23 2012 Jan Horak <jhorak@redhat.com> - 10.0.1-3
|
* Thu Feb 23 2012 Jan Horak <jhorak@redhat.com> - 10.0.1-3
|
||||||
- Added fix for proxy settings mozbz#682832
|
- Added fix for proxy settings mozbz#682832
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
diff -up xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp
|
|
||||||
--- xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig 2012-01-04 11:06:39.000000000 +0100
|
|
||||||
+++ xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp 2012-01-04 11:06:43.000000000 +0100
|
|
||||||
@@ -50,7 +50,6 @@
|
|
||||||
#include "jswatchpoint.h"
|
|
||||||
#include "jswrapper.h"
|
|
||||||
#include "assembler/wtf/Platform.h"
|
|
||||||
-#include "assembler/jit/ExecutableAllocator.h"
|
|
||||||
#include "yarr/BumpPointerAllocator.h"
|
|
||||||
#include "methodjit/MethodJIT.h"
|
|
||||||
#include "methodjit/PolyIC.h"
|
|
Loading…
Reference in New Issue
Block a user