~ubuntu-branches/ubuntu/quantal/firefox/quantal

« back to all changes in this revision

Viewing changes to debian/patches/avoid-dbus-roundtrip-for-httpchannel.patch

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-04-23 13:13:27 UTC
  • mfrom: (1.1.81) (150.1.1 precise-security)
  • Revision ID: package-import@ubuntu.com-20120423131327-0a91tc2y99pmnnft
Tags: 12.0+build1-0ubuntu0.12.04.1
* New upstream stable release (FIREFOX_12_0_BUILD1)
  - see LP: #987262 for USN information

* Update globalmenu-extension to 3.2.3
  - Fix regression introduced by the fix for LP: #915888
* Firefox recommends libcanberra0 now that bmo: #635918 has landed
  - update debian/control{,in}
* Refresh patches
  - update debian/patches/avoid-dbus-roundtrip-for-httpchannel.patch
  - update debian/patches/no-sps-profiler-on-unsupported-archs.patch
  - update debian/patches/ubuntu-codes-google.patch
* Refresh locales
  - refresh debian/config/locales.all
  - refresh debian/control
* Make the language packs Architecture: any. Whilst they are actually
  architecture independent, we do install them in to /usr/lib (as the
  extensions location is shared with architecture-specific extensions).
  This also avoids the problem of offering incompatible language pack
  upgrades to users on architectures where Firefox fails to build
  (I'm looking at you, powerpc)
  - update debian/control.langpacks
  - update debian/control.langpacks.unavail
  - update debian/rules
  - refresh debian/control
* Disable fix-build-failure-without-yarr-jit.patch, as it needs some work.
  This means that there is currently no powerpc support

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# User Chris Coulson <chris.coulson@canonical.com>
4
4
Bug 716467 - Don't call g_settings_new each time we look up system proxy settings
5
5
 
6
 
Index: mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
7
 
===================================================================
8
 
--- mozilla.orig/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2012-02-22 14:20:22.000000000 +0000
9
 
+++ mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp      2012-02-23 16:57:18.783367775 +0000
10
 
@@ -50,6 +50,7 @@
 
6
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
 
7
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
 
8
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
 
9
@@ -45,74 +45,78 @@
 
10
 #include "nsReadableUtils.h"
 
11
 #include "nsArrayUtils.h"
 
12
 #include "prnetdb.h"
 
13
 #include "prenv.h"
 
14
 #include "nsPrintfCString.h"
11
15
 #include "nsNetUtil.h"
12
16
 #include "nsISupportsPrimitives.h"
13
17
 #include "nsIGSettingsService.h"
15
19
 
16
20
 class nsUnixSystemProxySettings : public nsISystemProxySettings {
17
21
 public:
18
 
@@ -64,6 +65,8 @@
 
22
   NS_DECL_ISUPPORTS
 
23
   NS_DECL_NSISYSTEMPROXYSETTINGS
 
24
 
 
25
   nsUnixSystemProxySettings() {}
 
26
   nsresult Init();
 
27
 
 
28
 private:
 
29
   ~nsUnixSystemProxySettings() {}
19
30
   
20
31
   nsCOMPtr<nsIGConfService> mGConf;
21
32
   nsCOMPtr<nsIGSettingsService> mGSettings;
24
35
   bool IsProxyMode(const char* aMode);
25
36
   nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
26
37
   nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
27
 
@@ -76,8 +79,14 @@
 
38
   nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
 
39
   nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
 
40
 };
 
41
 
 
42
 NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
 
43
 
28
44
 nsresult
29
45
 nsUnixSystemProxySettings::Init()
30
46
 {
39
55
   return NS_OK;
40
56
 }
41
57
 
42
 
@@ -92,22 +101,17 @@
 
58
 bool
 
59
 nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
 
60
 {
 
61
   nsCAutoString mode;
 
62
   return NS_SUCCEEDED(mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) &&
 
63
          mode.EqualsASCII(aMode);
 
64
 }
 
65
 
43
66
 nsresult
44
67
 nsUnixSystemProxySettings::GetPACURI(nsACString& aResult)
45
68
 {
72
95
   }
73
96
 
74
97
   if (mGConf && IsProxyMode("auto")) {
75
 
@@ -266,10 +270,16 @@
 
98
     return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
 
99
                              aResult);
 
100
   }
 
101
   // Return an empty string when auto mode is not set.
 
102
   aResult.Truncate();
 
103
@@ -261,20 +265,26 @@ nsUnixSystemProxySettings::SetProxyResul
 
104
   SetProxyResult(aType, host, port, aResult);
 
105
   return NS_OK;
 
106
 }
 
107
 
 
108
 nsresult
76
109
 nsUnixSystemProxySettings::SetProxyResultFromGSettings(const char* aKeyBase, const char* aType,
77
110
                                                        nsACString& aResult)
78
111
 {
93
126
 
94
127
   nsCAutoString host;
95
128
   rv = proxy_settings->GetString(NS_LITERAL_CSTRING("host"), host);
96
 
@@ -451,15 +461,8 @@
 
129
   NS_ENSURE_SUCCESS(rv, rv);
 
130
   if (host.IsEmpty())
 
131
     return NS_ERROR_FAILURE;
 
132
   
 
133
   PRInt32 port;
 
134
@@ -446,35 +456,27 @@ nsUnixSystemProxySettings::GetProxyFromG
 
135
 }
 
136
 
 
137
 nsresult
 
138
 nsUnixSystemProxySettings::GetProxyFromGSettings(const nsACString& aScheme,
 
139
                                                  const nsACString& aHost,
97
140
                                                  PRInt32 aPort,
98
141
                                                  nsACString& aResult)
99
142
 {
102
145
-
103
146
-  rv = mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
104
147
-                                          getter_AddRefs(proxy_settings));
105
 
-  NS_ENSURE_SUCCESS(rv, rv);
 
148
-  if (NS_FAILED(rv))
 
149
-    return rv;
106
150
-
107
151
   nsCString proxyMode; 
108
152
-  rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode);
110
154
   NS_ENSURE_SUCCESS(rv, rv);
111
155
   
112
156
   if (!proxyMode.Equals("manual")) {
113
 
@@ -468,7 +471,7 @@
 
157
     aResult.AppendLiteral("DIRECT");
 
158
     return NS_OK;
114
159
   }
115
160
 
116
161
   nsCOMPtr<nsIArray> ignoreList;
119
164
                                                  getter_AddRefs(ignoreList))) && ignoreList) {
120
165
     PRUint32 len = 0;
121
166
     ignoreList->GetLength(&len);
122
 
@@ -525,7 +528,7 @@
 
167
     for (PRUint32 i = 0; i < len; ++i) {
 
168
       nsCOMPtr<nsISupportsCString> str = do_QueryElementAt(ignoreList, i);
 
169
       if (str) {
 
170
         nsCString s;
 
171
         if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
 
172
@@ -521,17 +523,17 @@ nsUnixSystemProxySettings::GetProxyForUR
 
173
   nsCAutoString host;
 
174
   rv = aURI->GetHost(host);
 
175
   NS_ENSURE_SUCCESS(rv, rv);
 
176
 
 
177
   PRInt32 port;
123
178
   rv = aURI->GetPort(&port);
124
179
   NS_ENSURE_SUCCESS(rv, rv);
125
180
 
128
183
     rv = GetProxyFromGSettings(scheme, host, port, aResult);
129
184
     if (rv == NS_OK)
130
185
       return rv;
 
186
   }
 
187
   if (mGConf)
 
188
     return GetProxyFromGConf(scheme, host, port, aResult);
 
189
 
 
190
   return GetProxyFromEnvironment(scheme, host, port, aResult);