summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-06-30 20:43:11 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-06-30 20:43:11 +0000
commitd252017754d29af41fec9e76f7197ff19ec87ecf (patch)
tree727081ef1810d1afeefff0a2e539209e5f812adc /www-client
parenteapi=4; vdr-plugin-2.eclass (diff)
downloadgentoo-2-d252017754d29af41fec9e76f7197ff19ec87ecf.tar.gz
gentoo-2-d252017754d29af41fec9e76f7197ff19ec87ecf.tar.bz2
gentoo-2-d252017754d29af41fec9e76f7197ff19ec87ecf.zip
version bump, also fixes bug #423343
(Portage version: 2.2.0_alpha114/cvs/Linux x86_64)
Diffstat (limited to 'www-client')
-rw-r--r--www-client/torbrowser/ChangeLog51
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-conten.patch10
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch8
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch8
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch14
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch14
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable.patch10
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0007-Disable-SSL-Session-ID-tracking.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0008-Disable-SSL-Session-ID-tracking.patch)4
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0008-Provide-an-observer-event-to-close-persistent-connec.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0009-Provide-an-observer-event-to-close-persistent-connec.patch)10
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch116
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0010-Provide-client-values-only-to-CSS-Media-Queries.patch72
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0010-Rebrand-Firefox-to-TorBrowser.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0012-Rebrand-Firefox-to-TorBrowser.patch)4
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0011-Make-Download-manager-memory-only.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0013-Make-Download-manager-memory-only.patch)14
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0012-Add-DDG-and-StartPage-to-Omnibox.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0014-Add-DDG-and-StartPage-to-Omnibox.patch)4
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0013-Make-nsICacheService.EvictEntries-synchronous.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0015-Make-nsICacheService.EvictEntries-synchronous.patch)8
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0014-Prevent-WebSocket-DNS-leak.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0016-Prevent-WebSocket-DNS-leak.patch)22
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0007-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch)19
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0016-Limit-the-number-of-fonts-per-document.patch (renamed from www-client/torbrowser/files/torbrowser-patches/0011-Limit-the-number-of-fonts-per-document.patch)55
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch60
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch537
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0018-Add-HTTP-auth-headers-before-the-modify-request-obse.patch52
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0019-Fix-Firefox-13-build-process.patch138
-rw-r--r--www-client/torbrowser/files/torbrowser-patches/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch45
-rw-r--r--www-client/torbrowser/torbrowser-13.0.ebuild (renamed from www-client/torbrowser/torbrowser-10.0.5.ebuild)16
24 files changed, 1025 insertions, 266 deletions
diff --git a/www-client/torbrowser/ChangeLog b/www-client/torbrowser/ChangeLog
index a1d02415f433..7a7d0110c66c 100644
--- a/www-client/torbrowser/ChangeLog
+++ b/www-client/torbrowser/ChangeLog
@@ -1,6 +1,55 @@
# ChangeLog for www-client/torbrowser
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/ChangeLog,v 1.4 2012/06/06 22:21:08 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/ChangeLog,v 1.5 2012/06/30 20:43:10 hasufell Exp $
+
+*torbrowser-13.0 (30 Jun 2012)
+
+ 30 Jun 2012; Julian Ospald <hasufell@gentoo.org>
+ +files/torbrowser-patches/0007-Disable-SSL-Session-ID-tracking.patch,
+ +files/torbrowser-patches/0008-Provide-an-observer-event-to-close-persistent-
+ connec.patch,
+ +files/torbrowser-patches/0009-Limit-device-and-system-specific-CSS-Media-Que
+ ries.patch,
+ +files/torbrowser-patches/0010-Rebrand-Firefox-to-TorBrowser.patch,
+ +files/torbrowser-patches/0011-Make-Download-manager-memory-only.patch,
+ +files/torbrowser-patches/0012-Add-DDG-and-StartPage-to-Omnibox.patch,
+ +files/torbrowser-patches/0013-Make-nsICacheService.EvictEntries-synchronous.
+ patch, +files/torbrowser-patches/0014-Prevent-WebSocket-DNS-leak.patch,
+ +files/torbrowser-patches/0015-Make-Tor-Browser-exit-when-not-launched-from-V
+ idalia.patch,
+ +files/torbrowser-patches/0016-Limit-the-number-of-fonts-per-document.patch,
+ +files/torbrowser-patches/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patc
+ h,
+ +files/torbrowser-patches/0020-Fix-internal-compile-error-for-sub-ancient-GCC
+ s.patch,
+ -files/torbrowser-patches/0007-Make-Tor-Browser-exit-when-not-launched-from-V
+ idalia.patch,
+ -files/torbrowser-patches/0008-Disable-SSL-Session-ID-tracking.patch,
+ -files/torbrowser-patches/0009-Provide-an-observer-event-to-close-persistent-
+ connec.patch,
+ -files/torbrowser-patches/0010-Provide-client-values-only-to-CSS-Media-Querie
+ s.patch,
+ -files/torbrowser-patches/0011-Limit-the-number-of-fonts-per-document.patch,
+ -files/torbrowser-patches/0012-Rebrand-Firefox-to-TorBrowser.patch,
+ -files/torbrowser-patches/0013-Make-Download-manager-memory-only.patch,
+ -files/torbrowser-patches/0014-Add-DDG-and-StartPage-to-Omnibox.patch,
+ -files/torbrowser-patches/0015-Make-nsICacheService.EvictEntries-synchronous.
+ patch, -files/torbrowser-patches/0016-Prevent-WebSocket-DNS-leak.patch,
+ -files/torbrowser-patches/0018-Add-HTTP-auth-headers-before-the-modify-reques
+ t-obse.patch,
+ files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-c
+ onten.patch,
+ files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch,
+ -torbrowser-10.0.5.ebuild,
+ files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch,
+ files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch,
+ files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch,
+ files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable
+ .patch,
+ files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth
+ .patch, +torbrowser-13.0.ebuild,
+ +files/torbrowser-patches/0019-Fix-Firefox-13-build-process.patch:
+ version bump, also fixes bug #423343
*torbrowser-10.0.5 (06 Jun 2012)
diff --git a/www-client/torbrowser/files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-conten.patch b/www-client/torbrowser/files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-conten.patch
index 1f4a712674bf..fe7ff85019d8 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-conten.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0001-Block-Components.interfaces-lookupMethod-from-conten.patch
@@ -1,7 +1,7 @@
-From 18fea351a9f218893514ccbca82c492ce81d038d Mon Sep 17 00:00:00 2001
+From 801d2dcc512ca5e64b72d56faaab7d8ef0fadf39 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 1 Feb 2012 15:40:40 -0800
-Subject: [PATCH 01/18] Block Components.interfaces,lookupMethod from content
+Subject: [PATCH 01/20] Block Components.interfaces,lookupMethod from content
This patch removes the ability of content script to access
Components.interfaces.* as well as call or access Components.lookupMethod.
@@ -20,10 +20,10 @@ https://trac.torproject.org/projects/tor/ticket/2874
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp
-index 3bcbf91..d5c020a 100644
+index a2a1102..49e4c7e 100644
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
-@@ -4456,7 +4456,9 @@ nsXPCComponents::CanCreateWrapper(const nsIID * iid, char **_retval)
+@@ -4287,7 +4287,9 @@ nsXPCComponents::CanCreateWrapper(const nsIID * iid, char **_retval)
NS_IMETHODIMP
nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, char **_retval)
{
@@ -34,7 +34,7 @@ index 3bcbf91..d5c020a 100644
*_retval = xpc_CheckAccessList(methodName, allowed);
return NS_OK;
}
-@@ -4465,7 +4467,9 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c
+@@ -4296,7 +4298,9 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c
NS_IMETHODIMP
nsXPCComponents::CanGetProperty(const nsIID * iid, const PRUnichar *propertyName, char **_retval)
{
diff --git a/www-client/torbrowser/files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch b/www-client/torbrowser/files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch
index 1638a750f87d..524ca62b19a2 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0002-Make-Permissions-Manager-memory-only.patch
@@ -1,7 +1,7 @@
-From 336217485d707ff63ef42d2a0bc3705c2c7f7a3c Mon Sep 17 00:00:00 2001
+From 4c65de64fc28ca767009a0d0acfcefd8f2a73ad8 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 1 Feb 2012 15:45:16 -0800
-Subject: [PATCH 02/18] Make Permissions Manager memory-only
+Subject: [PATCH 02/20] Make Permissions Manager memory-only
This patch exposes a pref 'permissions.memory_only' that properly isolates the
permissions manager to memory, which is responsible for all user specified
@@ -16,7 +16,7 @@ https://trac.torproject.org/projects/tor/ticket/2950
1 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp
-index 67eb216..12cc7cf 100644
+index cdfe21b..a7a0efb 100644
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -58,6 +58,10 @@
@@ -75,7 +75,7 @@ index 67eb216..12cc7cf 100644
NS_ENSURE_SUCCESS(rv, rv);
mDBConn->GetConnectionReady(&ready);
-@@ -783,7 +806,12 @@ NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aT
+@@ -794,7 +817,12 @@ NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aT
{
ENSURE_NOT_CHILD_PROCESS;
diff --git a/www-client/torbrowser/files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch b/www-client/torbrowser/files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch
index faaa4b35f41f..bb97b2d580f1 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0003-Make-Intermediate-Cert-Store-memory-only.patch
@@ -1,7 +1,7 @@
-From e6d127b805461470bff0dad12f5ad89fc3cd3df3 Mon Sep 17 00:00:00 2001
+From 6b5b4816ffff9875f8fd3364841fde872a2af7a4 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@fscked.org>
Date: Fri, 19 Aug 2011 17:58:23 -0700
-Subject: [PATCH 03/18] Make Intermediate Cert Store memory-only.
+Subject: [PATCH 03/20] Make Intermediate Cert Store memory-only.
This patch makes the intermediate SSL cert store exist in memory only.
@@ -12,10 +12,10 @@ https://trac.torproject.org/projects/tor/ticket/2949
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
-index a08c4ef..0ec3713 100644
+index 89ad70e..783d0d2 100644
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
-@@ -1730,8 +1730,21 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
+@@ -1755,8 +1755,21 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
// Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as
// "/usr/lib/nss/libnssckbi.so".
PRUint32 init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
diff --git a/www-client/torbrowser/files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch b/www-client/torbrowser/files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch
index d917eb4399f2..b33a62866a40 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0004-Add-a-string-based-cacheKey.patch
@@ -1,7 +1,7 @@
-From 84668dfe7bdcd35d96ffcaf273ade5a5d8d470f8 Mon Sep 17 00:00:00 2001
+From b2dfbf250bc83592e73abf932c5301f1688a277b Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@fscked.org>
Date: Fri, 2 Sep 2011 20:47:02 -0700
-Subject: [PATCH 04/18] Add a string-based cacheKey.
+Subject: [PATCH 04/20] Add a string-based cacheKey.
Used for isolating cache according to same-origin policy.
---
@@ -29,10 +29,10 @@ index 2da46d6..4ee5774 100644
* may fail if the disk cache is not present. The value of this attribute
* is usually only settable during the processing of a channel's
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
-index dec2a83..97bd84c 100644
+index 34291f4..92f2d7d 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
-@@ -2392,6 +2392,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID,
+@@ -2415,6 +2415,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID,
cacheKey.Append(buf);
}
@@ -45,7 +45,7 @@ index dec2a83..97bd84c 100644
if (!cacheKey.IsEmpty()) {
cacheKey.AppendLiteral("uri=");
}
-@@ -4695,6 +4701,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value)
+@@ -4784,6 +4790,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value)
}
NS_IMETHODIMP
@@ -69,10 +69,10 @@ index dec2a83..97bd84c 100644
{
value = mOfflineCacheClientID;
diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h
-index 88ce469..53538cf 100644
+index f8e59fe..a5b7d1e 100644
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
-@@ -303,6 +303,7 @@ private:
+@@ -306,6 +306,7 @@ private:
nsCOMPtr<nsICacheEntryDescriptor> mOfflineCacheEntry;
nsCacheAccessMode mOfflineCacheAccess;
nsCString mOfflineCacheClientID;
diff --git a/www-client/torbrowser/files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch b/www-client/torbrowser/files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch
index bb00c55ea965..2cfa7ba2bb04 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0005-Block-all-plugins-except-flash.patch
@@ -1,7 +1,7 @@
-From 3457f78e346df5962449cbd5aa86624e19fd5f64 Mon Sep 17 00:00:00 2001
+From 47235106c9e1257c66bab774aab330be4dabcfb0 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 1 Feb 2012 15:50:15 -0800
-Subject: [PATCH 05/18] Block all plugins except flash.
+Subject: [PATCH 05/20] Block all plugins except flash.
We cannot use the @mozilla.org/extensions/blocklist;1 service, because we
actually want to stop plugins from ever entering the browser's process space
@@ -17,10 +17,10 @@ on a better way. Until then, it is delta-darwinism for us.
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
-index 992bcd4..f56f231 100644
+index 0c3efa0..e607e68 100644
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
-@@ -1968,6 +1968,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag)
+@@ -2002,6 +2002,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag)
return false;
}
@@ -56,7 +56,7 @@ index 992bcd4..f56f231 100644
typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void);
nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
-@@ -2101,6 +2130,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
+@@ -2135,6 +2164,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
continue;
}
@@ -68,10 +68,10 @@ index 992bcd4..f56f231 100644
if (!pluginTag) {
nsPluginFile pluginFile(localfile);
diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h
-index 39a8891..c262abf 100644
+index 1b46957..4f1e890 100644
--- a/dom/plugins/base/nsPluginHost.h
+++ b/dom/plugins/base/nsPluginHost.h
-@@ -278,6 +278,8 @@ private:
+@@ -285,6 +285,8 @@ private:
// Loads all cached plugins info into mCachedPlugins
nsresult ReadPluginInfo();
diff --git a/www-client/torbrowser/files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable.patch b/www-client/torbrowser/files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable.patch
index 285c6193e62f..77f9e41d2589 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0006-Make-content-pref-service-memory-only-clearable.patch
@@ -1,7 +1,7 @@
-From 66ff6c30d5b1de5d549181acbba686f792fe4cb4 Mon Sep 17 00:00:00 2001
+From bd560666419266a862d5b0387c7941c8ef7bb624 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@fscked.org>
Date: Thu, 8 Sep 2011 08:40:17 -0700
-Subject: [PATCH 06/18] Make content pref service memory-only + clearable
+Subject: [PATCH 06/20] Make content pref service memory-only + clearable
This prevents random urls from being inserted into content-prefs.sqllite in
the profile directory as content prefs change (includes site-zoom and perhaps
@@ -11,10 +11,10 @@ other site prefs?).
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js
-index adfb650..1619d5f 100644
+index 68a5561..effc33c 100644
--- a/toolkit/components/contentprefs/nsContentPrefService.js
+++ b/toolkit/components/contentprefs/nsContentPrefService.js
-@@ -1240,7 +1240,7 @@ ContentPrefService.prototype = {
+@@ -1242,7 +1242,7 @@ ContentPrefService.prototype = {
var dbConnection;
@@ -23,7 +23,7 @@ index adfb650..1619d5f 100644
dbConnection = this._dbCreate(dbService, dbFile);
else {
try {
-@@ -1288,7 +1288,7 @@ ContentPrefService.prototype = {
+@@ -1290,7 +1290,7 @@ ContentPrefService.prototype = {
},
_dbCreate: function ContentPrefService__dbCreate(aDBService, aDBFile) {
diff --git a/www-client/torbrowser/files/torbrowser-patches/0008-Disable-SSL-Session-ID-tracking.patch b/www-client/torbrowser/files/torbrowser-patches/0007-Disable-SSL-Session-ID-tracking.patch
index 2c8669ebc7bd..1f19c8afd988 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0008-Disable-SSL-Session-ID-tracking.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0007-Disable-SSL-Session-ID-tracking.patch
@@ -1,7 +1,7 @@
-From 70161b38e1855ce4b7a61ac1e9572fb07dfbedda Mon Sep 17 00:00:00 2001
+From 3eebe3b7e2882de39e2c686a38e7084cccfa4c60 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@fscked.org>
Date: Wed, 7 Dec 2011 19:36:38 -0800
-Subject: [PATCH 08/18] Disable SSL Session ID tracking.
+Subject: [PATCH 07/20] Disable SSL Session ID tracking.
We can't easily bind SSL Session ID tracking to url bar domain,
so we have to disable them to satisfy
diff --git a/www-client/torbrowser/files/torbrowser-patches/0009-Provide-an-observer-event-to-close-persistent-connec.patch b/www-client/torbrowser/files/torbrowser-patches/0008-Provide-an-observer-event-to-close-persistent-connec.patch
index cf63ff11e312..1de839ec4773 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0009-Provide-an-observer-event-to-close-persistent-connec.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0008-Provide-an-observer-event-to-close-persistent-connec.patch
@@ -1,7 +1,7 @@
-From d5ef29d9219a7ff9a78f9523845a2e2966c2a266 Mon Sep 17 00:00:00 2001
+From 9594d3f2df4f20308406deea30aaccd577587438 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 1 Feb 2012 15:53:28 -0800
-Subject: [PATCH 09/18] Provide an observer event to close persistent
+Subject: [PATCH 08/20] Provide an observer event to close persistent
connections
We need to prevent linkability across "New Identity", which includes closing
@@ -11,10 +11,10 @@ keep-alive connections.
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
-index 281d6ff..8125681 100644
+index dcdf729..672d436 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
-@@ -325,6 +325,7 @@ nsHttpHandler::Init()
+@@ -338,6 +338,7 @@ nsHttpHandler::Init()
mObserverService->AddObserver(this, "net:clear-active-logins", true);
mObserverService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, true);
mObserverService->AddObserver(this, "net:prune-dead-connections", true);
@@ -22,7 +22,7 @@ index 281d6ff..8125681 100644
}
return NS_OK;
-@@ -1504,6 +1505,12 @@ nsHttpHandler::Observe(nsISupports *subject,
+@@ -1587,6 +1588,12 @@ nsHttpHandler::Observe(nsISupports *subject,
mConnMgr->PruneDeadConnections();
}
}
diff --git a/www-client/torbrowser/files/torbrowser-patches/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch b/www-client/torbrowser/files/torbrowser-patches/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch
new file mode 100644
index 000000000000..06e3e813bb81
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-patches/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch
@@ -0,0 +1,116 @@
+From 6c09a21d1db29dc28b359294ededc047ba5b463e Mon Sep 17 00:00:00 2001
+From: Shondoit Walker <shondoit@gmail.com>
+Date: Mon, 4 Jun 2012 19:15:31 +0200
+Subject: [PATCH 09/20] Limit device- and system-specific CSS Media Queries
+
+This is done to address
+https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability
+
+This also fixes bug #4795 by making queries still available for chrome windows,
+whilst returning nothing or non-device-specific values for web pages or extensions.
+---
+ layout/style/nsMediaFeatures.cpp | 42 ++++++++++++++++++++++++-------------
+ 1 files changed, 27 insertions(+), 15 deletions(-)
+
+diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
+index 6eca06e..25735e8 100644
+--- a/layout/style/nsMediaFeatures.cpp
++++ b/layout/style/nsMediaFeatures.cpp
+@@ -130,6 +130,9 @@ GetDeviceContextFor(nsPresContext* aPresContext)
+ static nsSize
+ GetDeviceSize(nsPresContext* aPresContext)
+ {
++ if (!aPresContext->IsChrome()) {
++ return GetSize(aPresContext);
++ } else {
+ nsSize size;
+ if (aPresContext->IsRootPaginatedDocument())
+ // We want the page size, including unprintable areas and margins.
+@@ -140,6 +143,7 @@ GetDeviceSize(nsPresContext* aPresContext)
+ GetDeviceContextFor(aPresContext)->
+ GetDeviceSurfaceDimensions(size.width, size.height);
+ return size;
++ }
+ }
+
+ static nsresult
+@@ -183,17 +187,17 @@ static nsresult
+ GetDeviceOrientation(nsPresContext* aPresContext, const nsMediaFeature*,
+ nsCSSValue& aResult)
+ {
+- nsSize size = GetDeviceSize(aPresContext);
+- PRInt32 orientation;
+- if (size.width > size.height) {
+- orientation = NS_STYLE_ORIENTATION_LANDSCAPE;
+- } else {
+- // Per spec, square viewports should be 'portrait'
+- orientation = NS_STYLE_ORIENTATION_PORTRAIT;
+- }
+-
+- aResult.SetIntValue(orientation, eCSSUnit_Enumerated);
+- return NS_OK;
++ nsSize size = GetDeviceSize(aPresContext);
++ PRInt32 orientation;
++ if (size.width > size.height) {
++ orientation = NS_STYLE_ORIENTATION_LANDSCAPE;
++ } else {
++ // Per spec, square viewports should be 'portrait'
++ orientation = NS_STYLE_ORIENTATION_PORTRAIT;
++ }
++
++ aResult.SetIntValue(orientation, eCSSUnit_Enumerated);
++ return NS_OK;
+ }
+
+ static nsresult
+@@ -311,8 +315,12 @@ static nsresult
+ GetDevicePixelRatio(nsPresContext* aPresContext, const nsMediaFeature*,
+ nsCSSValue& aResult)
+ {
+- float ratio = aPresContext->CSSPixelsToDevPixels(1.0f);
+- aResult.SetFloatValue(ratio, eCSSUnit_Number);
++ if (aPresContext->IsChrome()) {
++ float ratio = aPresContext->CSSPixelsToDevPixels(1.0f);
++ aResult.SetFloatValue(ratio, eCSSUnit_Number);
++ } else {
++ aResult.SetFloatValue(1.0, eCSSUnit_Number);
++ }
+ return NS_OK;
+ }
+
+@@ -320,18 +328,21 @@ static nsresult
+ GetSystemMetric(nsPresContext* aPresContext, const nsMediaFeature* aFeature,
+ nsCSSValue& aResult)
+ {
++ if (aPresContext->IsChrome()) {
+ NS_ABORT_IF_FALSE(aFeature->mValueType == nsMediaFeature::eBoolInteger,
+ "unexpected type");
+ nsIAtom *metricAtom = *aFeature->mData.mMetric;
+ bool hasMetric = nsCSSRuleProcessor::HasSystemMetric(metricAtom);
+ aResult.SetIntValue(hasMetric ? 1 : 0, eCSSUnit_Integer);
+- return NS_OK;
++ }
++ return NS_OK;
+ }
+
+ static nsresult
+ GetWindowsTheme(nsPresContext* aPresContext, const nsMediaFeature* aFeature,
+ nsCSSValue& aResult)
+ {
++ if (aPresContext->IsChrome()) {
+ aResult.Reset();
+ #ifdef XP_WIN
+ PRUint8 windowsThemeId =
+@@ -350,7 +361,8 @@ GetWindowsTheme(nsPresContext* aPresContext, const nsMediaFeature* aFeature,
+ }
+ }
+ #endif
+- return NS_OK;
++ }
++ return NS_OK;
+ }
+
+ /*
+--
+1.7.5.4
+
diff --git a/www-client/torbrowser/files/torbrowser-patches/0010-Provide-client-values-only-to-CSS-Media-Queries.patch b/www-client/torbrowser/files/torbrowser-patches/0010-Provide-client-values-only-to-CSS-Media-Queries.patch
deleted file mode 100644
index fc55116642bd..000000000000
--- a/www-client/torbrowser/files/torbrowser-patches/0010-Provide-client-values-only-to-CSS-Media-Queries.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From ee455135f0084be04e74952182e4f948643c5347 Mon Sep 17 00:00:00 2001
-From: Mike Perry <mikeperry-git@fscked.org>
-Date: Tue, 20 Dec 2011 21:02:49 -0800
-Subject: [PATCH 10/18] Provide client values only to CSS Media Queries
-
-Also disable a bunch of Mozilla extensions that smell like they are
-fingerprintable.
-
-This is done to address
-https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability
----
- layout/style/nsMediaFeatures.cpp | 10 ++++++----
- 1 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
-index 6eca06e..c68f191 100644
---- a/layout/style/nsMediaFeatures.cpp
-+++ b/layout/style/nsMediaFeatures.cpp
-@@ -383,14 +383,14 @@ nsMediaFeatures::features[] = {
- nsMediaFeature::eMinMaxAllowed,
- nsMediaFeature::eLength,
- { nsnull },
-- GetDeviceWidth
-+ GetWidth
- },
- {
- &nsGkAtoms::deviceHeight,
- nsMediaFeature::eMinMaxAllowed,
- nsMediaFeature::eLength,
- { nsnull },
-- GetDeviceHeight
-+ GetHeight
- },
- {
- &nsGkAtoms::orientation,
-@@ -411,7 +411,7 @@ nsMediaFeatures::features[] = {
- nsMediaFeature::eMinMaxAllowed,
- nsMediaFeature::eIntRatio,
- { nsnull },
-- GetDeviceAspectRatio
-+ GetAspectRatio
- },
- {
- &nsGkAtoms::color,
-@@ -457,6 +457,7 @@ nsMediaFeatures::features[] = {
- },
-
- // Mozilla extensions
-+/*
- {
- &nsGkAtoms::_moz_device_pixel_ratio,
- nsMediaFeature::eMinMaxAllowed,
-@@ -469,7 +470,7 @@ nsMediaFeatures::features[] = {
- nsMediaFeature::eMinMaxNotAllowed,
- nsMediaFeature::eEnumerated,
- { kOrientationKeywords },
-- GetDeviceOrientation
-+ GetOrientation
- },
- {
- &nsGkAtoms::_moz_is_resource_document,
-@@ -590,6 +591,7 @@ nsMediaFeatures::features[] = {
- { nsnull },
- GetWindowsTheme
- },
-+*/
- // Null-mName terminator:
- {
- nsnull,
---
-1.7.5.4
-
diff --git a/www-client/torbrowser/files/torbrowser-patches/0012-Rebrand-Firefox-to-TorBrowser.patch b/www-client/torbrowser/files/torbrowser-patches/0010-Rebrand-Firefox-to-TorBrowser.patch
index 6f087be32831..baffded3d08d 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0012-Rebrand-Firefox-to-TorBrowser.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0010-Rebrand-Firefox-to-TorBrowser.patch
@@ -1,7 +1,7 @@
-From a1fcacb6cf3286226552028775aa41c4109546a6 Mon Sep 17 00:00:00 2001
+From 622437f3baf410f14610b21bcca7f9a0fcc8c6d9 Mon Sep 17 00:00:00 2001
From: Erinn Clark <erinn@torproject.org>
Date: Wed, 25 Apr 2012 09:14:00 -0300
-Subject: [PATCH 12/18] Rebrand Firefox to TorBrowser
+Subject: [PATCH 10/20] Rebrand Firefox to TorBrowser
This patch does some basic renaming of Firefox to TorBrowser. The rest of the
branding is done by images and icons.
diff --git a/www-client/torbrowser/files/torbrowser-patches/0013-Make-Download-manager-memory-only.patch b/www-client/torbrowser/files/torbrowser-patches/0011-Make-Download-manager-memory-only.patch
index 171a699fd69c..67d48175a93b 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0013-Make-Download-manager-memory-only.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0011-Make-Download-manager-memory-only.patch
@@ -1,7 +1,7 @@
-From c1ddd87b5cc6e69516c4b465cfa992a5c496e6d0 Mon Sep 17 00:00:00 2001
+From 8992ae1cb7e1545413e649027ab7827799c53300 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 25 Apr 2012 13:39:35 -0700
-Subject: [PATCH 13/18] Make Download manager memory only.
+Subject: [PATCH 11/20] Make Download manager memory only.
Solves https://trac.torproject.org/projects/tor/ticket/4017.
@@ -18,10 +18,10 @@ this breaks enough times in conflict.
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
-index 00a6e7d..2e83f61 100644
+index cb1f1f6..1de653b 100644
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
-@@ -1992,7 +1992,7 @@ nsDownloadManager::Observe(nsISupports *aSubject,
+@@ -1999,7 +1999,7 @@ nsDownloadManager::Observe(nsISupports *aSubject,
if (NS_LITERAL_STRING("memory").Equals(aData))
return SwitchDatabaseTypeTo(DATABASE_MEMORY);
else if (NS_LITERAL_STRING("disk").Equals(aData))
@@ -30,7 +30,7 @@ index 00a6e7d..2e83f61 100644
}
else if (strcmp(aTopic, "alertclickcallback") == 0) {
nsCOMPtr<nsIDownloadManagerUI> dmui =
-@@ -2069,7 +2069,7 @@ nsDownloadManager::OnLeavePrivateBrowsingMode()
+@@ -2076,7 +2076,7 @@ nsDownloadManager::OnLeavePrivateBrowsingMode()
(void)ResumeAllDownloads(false);
// Switch back to the on-disk DB again
@@ -40,10 +40,10 @@ index 00a6e7d..2e83f61 100644
mInPrivateBrowsing = false;
}
diff --git a/toolkit/components/downloads/nsDownloadManager.h b/toolkit/components/downloads/nsDownloadManager.h
-index 54312e4..cb63b52 100644
+index 16a861e..e729cbf 100644
--- a/toolkit/components/downloads/nsDownloadManager.h
+++ b/toolkit/components/downloads/nsDownloadManager.h
-@@ -90,7 +90,7 @@ public:
+@@ -92,7 +92,7 @@ public:
virtual ~nsDownloadManager();
nsDownloadManager() :
diff --git a/www-client/torbrowser/files/torbrowser-patches/0014-Add-DDG-and-StartPage-to-Omnibox.patch b/www-client/torbrowser/files/torbrowser-patches/0012-Add-DDG-and-StartPage-to-Omnibox.patch
index 2a9e97c349f9..9452b8b03ad0 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0014-Add-DDG-and-StartPage-to-Omnibox.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0012-Add-DDG-and-StartPage-to-Omnibox.patch
@@ -1,7 +1,7 @@
-From bac6dfa9b86a7389ab5217be629ec2c490dcf193 Mon Sep 17 00:00:00 2001
+From 59b8b663b93248db34ad741ccb9972ecb6814c1f Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 25 Apr 2012 15:03:46 -0700
-Subject: [PATCH 14/18] Add DDG and StartPage to Omnibox.
+Subject: [PATCH 12/20] Add DDG and StartPage to Omnibox.
You mean there are search engines that don't require captchas if you don't
have a cookie? Holy crap. Get those in there now.
diff --git a/www-client/torbrowser/files/torbrowser-patches/0015-Make-nsICacheService.EvictEntries-synchronous.patch b/www-client/torbrowser/files/torbrowser-patches/0013-Make-nsICacheService.EvictEntries-synchronous.patch
index f51bd3c29241..0514fb85f599 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0015-Make-nsICacheService.EvictEntries-synchronous.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0013-Make-nsICacheService.EvictEntries-synchronous.patch
@@ -1,7 +1,7 @@
-From 22fe0ff634913df18d3757d5bdf9faf8527ab395 Mon Sep 17 00:00:00 2001
+From 3b6137594c9f25725b3dd0fd46cfc8c86d6a772e Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Tue, 1 May 2012 15:02:03 -0700
-Subject: [PATCH 15/18] Make nsICacheService.EvictEntries synchronous
+Subject: [PATCH 13/20] Make nsICacheService.EvictEntries synchronous
This fixes a race condition that allows cache-based EverCookies to persist for
a brief time (on the order of minutes?) after cache clearing/"New Identity".
@@ -12,10 +12,10 @@ https://trac.torproject.org/projects/tor/ticket/5715
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp
-index 8af611f..65686c7 100644
+index 8c85b68..d43f121 100644
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
-@@ -1315,10 +1315,21 @@ NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor)
+@@ -1414,10 +1414,21 @@ NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor)
return NS_OK;
}
diff --git a/www-client/torbrowser/files/torbrowser-patches/0016-Prevent-WebSocket-DNS-leak.patch b/www-client/torbrowser/files/torbrowser-patches/0014-Prevent-WebSocket-DNS-leak.patch
index c9a8e91439d6..e95b223d96e3 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0016-Prevent-WebSocket-DNS-leak.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0014-Prevent-WebSocket-DNS-leak.patch
@@ -1,7 +1,7 @@
-From 975bce873ae2d127e6a0681466b21d55e14b1550 Mon Sep 17 00:00:00 2001
+From 0607517f87c2a0060f4f1e437f0ac37a889047a9 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Wed, 2 May 2012 17:44:39 -0700
-Subject: [PATCH 16/18] Prevent WebSocket DNS leak.
+Subject: [PATCH 14/20] Prevent WebSocket DNS leak.
This is due to an improper implementation of the WebSocket spec by Mozilla.
@@ -29,10 +29,10 @@ bug can't turn up in other components or due to 3rd party addons.
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/netwerk/dns/nsDNSService2.cpp b/netwerk/dns/nsDNSService2.cpp
-index 68ad8a5..1253b2f 100644
+index 7458729..40fbaba 100644
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
-@@ -383,6 +383,7 @@ nsDNSService::Init()
+@@ -403,6 +403,7 @@ nsDNSService::Init()
bool enableIDN = true;
bool disableIPv6 = false;
bool disablePrefetch = false;
@@ -40,7 +40,7 @@ index 68ad8a5..1253b2f 100644
int proxyType = nsIProtocolProxyService::PROXYCONFIG_DIRECT;
nsAdoptingCString ipv4OnlyDomains;
-@@ -404,6 +405,10 @@ nsDNSService::Init()
+@@ -426,6 +427,10 @@ nsDNSService::Init()
// If a manual proxy is in use, disable prefetch implicitly
prefs->GetIntPref("network.proxy.type", &proxyType);
@@ -51,7 +51,7 @@ index 68ad8a5..1253b2f 100644
}
if (mFirstTime) {
-@@ -420,7 +425,7 @@ nsDNSService::Init()
+@@ -443,7 +448,7 @@ nsDNSService::Init()
// Monitor these to see if there is a change in proxy configuration
// If a manual proxy is in use, disable prefetch implicitly
@@ -60,7 +60,7 @@ index 68ad8a5..1253b2f 100644
}
}
-@@ -448,6 +453,7 @@ nsDNSService::Init()
+@@ -472,6 +477,7 @@ nsDNSService::Init()
mIDN = idn;
mIPv4OnlyDomains = ipv4OnlyDomains; // exchanges buffer ownership
mDisableIPv6 = disableIPv6;
@@ -68,7 +68,7 @@ index 68ad8a5..1253b2f 100644
// Disable prefetching either by explicit preference or if a manual proxy is configured
mDisablePrefetch = disablePrefetch || (proxyType == nsIProtocolProxyService::PROXYCONFIG_MANUAL);
-@@ -547,6 +553,14 @@ nsDNSService::AsyncResolve(const nsACString &hostname,
+@@ -583,6 +589,14 @@ nsDNSService::AsyncResolve(const nsACString &hostname,
if (mDisablePrefetch && (flags & RESOLVE_SPECULATE))
return NS_ERROR_DNS_LOOKUP_QUEUE_FULL;
@@ -83,7 +83,7 @@ index 68ad8a5..1253b2f 100644
res = mResolver;
idn = mIDN;
}
-@@ -597,6 +611,14 @@ nsDNSService::Resolve(const nsACString &hostname,
+@@ -669,6 +683,14 @@ nsDNSService::Resolve(const nsACString &hostname,
MutexAutoLock lock(mLock);
res = mResolver;
idn = mIDN;
@@ -109,10 +109,10 @@ index 1749b41..3ec8eba 100644
+ bool mDisableDNS;
};
diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp
-index 9e446e9..42aa6ca 100644
+index 3578866..b1aaec2 100644
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
-@@ -1698,8 +1698,12 @@ WebSocketChannel::ApplyForAdmission()
+@@ -1884,8 +1884,12 @@ WebSocketChannel::ApplyForAdmission()
LOG(("WebSocketChannel::ApplyForAdmission: checking for concurrent open\n"));
nsCOMPtr<nsIThread> mainThread;
NS_GetMainThread(getter_AddRefs(mainThread));
diff --git a/www-client/torbrowser/files/torbrowser-patches/0007-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch b/www-client/torbrowser/files/torbrowser-patches/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch
index af74f2c013c6..8d0aee3dbad0 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0007-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch
@@ -1,7 +1,7 @@
-From d6956a597662f3d753622377183cb317ef6a3ad4 Mon Sep 17 00:00:00 2001
-From: Mike Perry <mikeperry-git@fscked.org>
-Date: Sun, 9 Oct 2011 22:50:07 -0700
-Subject: [PATCH 07/18] Make Tor Browser exit when not launched from Vidalia
+From c482a4bd10c58099f7bab0c5990c6e5a29b6c59d Mon Sep 17 00:00:00 2001
+From: Mike Perry <mikeperry-git@torproject.org>
+Date: Thu, 7 Jun 2012 14:45:26 -0700
+Subject: [PATCH 15/20] Make Tor Browser exit when not launched from Vidalia
Turns out the Windows 7 UI encourages users to "dock" their Tor Browser app
for easy relaunch. If they manage to do this, we should fail closed rather
@@ -12,14 +12,14 @@ https://trac.torproject.org/projects/tor/ticket/4192. We can do a better
localized fix w/ a translated alert menu later, if it seems like this might
actually be common.
---
- browser/base/content/browser.js | 15 +++++++++++++++
- 1 files changed, 15 insertions(+), 0 deletions(-)
+ browser/base/content/browser.js | 14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
-index b06a17b..fc1d305 100644
+index 6e254ca..57ca373 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
-@@ -1217,6 +1217,21 @@ function BrowserStartup() {
+@@ -1234,6 +1234,20 @@ function BrowserStartup() {
prepareForStartup();
@@ -37,8 +37,7 @@ index b06a17b..fc1d305 100644
+ appStartup.quit(3); // Force all windows to close, and then quit.
+ }
+
-+
- if (uriToLoad && !isLoadingBlank) {
+ if (uriToLoad && uriToLoad != "about:blank") {
if (uriToLoad instanceof Ci.nsISupportsArray) {
let count = uriToLoad.Count();
--
diff --git a/www-client/torbrowser/files/torbrowser-patches/0011-Limit-the-number-of-fonts-per-document.patch b/www-client/torbrowser/files/torbrowser-patches/0016-Limit-the-number-of-fonts-per-document.patch
index 3e0391d334e3..dcb5f52af5d0 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0011-Limit-the-number-of-fonts-per-document.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0016-Limit-the-number-of-fonts-per-document.patch
@@ -1,7 +1,7 @@
-From 6eff7de2e19b0970b04b8721be4f46577617894c Mon Sep 17 00:00:00 2001
+From 649b237e95315e9858cfb038f9f7f95199584cbd Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
-Date: Wed, 1 Feb 2012 16:01:21 -0800
-Subject: [PATCH 11/18] Limit the number of fonts per document.
+Date: Thu, 7 Jun 2012 15:09:59 -0700
+Subject: [PATCH 16/20] Limit the number of fonts per document.
We create two prefs:
browser.display.max_font_count and browser.display.max_font_attempts.
@@ -23,10 +23,10 @@ https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkabilit
3 files changed, 119 insertions(+), 3 deletions(-)
diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp
-index e1587db..9690d9c 100644
+index f3815fb..1ab210e 100644
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
-@@ -98,6 +98,8 @@
+@@ -97,6 +97,8 @@
#include "FrameLayerBuilder.h"
#include "nsDOMMediaQueryList.h"
#include "nsSMILAnimationController.h"
@@ -35,7 +35,7 @@ index e1587db..9690d9c 100644
#ifdef IBMBIDI
#include "nsBidiPresUtils.h"
-@@ -706,6 +708,10 @@ nsPresContext::GetUserPreferences()
+@@ -772,6 +774,10 @@ nsPresContext::GetUserPreferences()
// * use fonts?
mUseDocumentFonts =
Preferences::GetInt("browser.display.use_document_fonts") != 0;
@@ -46,7 +46,7 @@ index e1587db..9690d9c 100644
// * replace backslashes with Yen signs? (bug 245770)
mEnableJapaneseTransform =
-@@ -1300,6 +1306,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID) const
+@@ -1381,6 +1387,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID, nsIAtom *aLanguage) const
return font;
}
@@ -148,10 +148,10 @@ index e1587db..9690d9c 100644
nsPresContext::SetFullZoom(float aZoom)
{
diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h
-index ecd01d8..552a69a 100644
+index e367c5f..3d979f1 100644
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
-@@ -548,6 +548,13 @@ public:
+@@ -535,6 +535,13 @@ public:
}
}
@@ -162,10 +162,10 @@ index ecd01d8..552a69a 100644
+ PRBool FontUseCountReached(const nsFont &font);
+ PRBool FontAttemptCountReached(const nsFont &font);
+
- PRInt32 MinFontSize() const {
- return NS_MAX(mMinFontSize, mMinimumFontSizePref);
- }
-@@ -1117,6 +1124,8 @@ protected:
+ /**
+ * Get the minimum font size for the specified language. If aLanguage
+ * is nsnull, then the document's language is used.
+@@ -1188,6 +1195,8 @@ protected:
PRUint32 mInterruptChecksToSkip;
mozilla::TimeStamp mReflowStartTime;
@@ -175,31 +175,28 @@ index ecd01d8..552a69a 100644
unsigned mHasPendingInterrupt : 1;
unsigned mInterruptsEnabled : 1;
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
-index 27336bf..827585a 100644
+index 4b134b2..82b1dd7 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
-@@ -3091,6 +3091,7 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
+@@ -3102,14 +3102,15 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
- // See if there is a minimum font-size constraint to honor
- nscoord minimumFontSize = mPresContext->MinFontSize();
-+ PRBool isXUL = PR_FALSE;
+ bool useDocumentFonts =
+ mPresContext->GetCachedBoolPref(kPresContext_UseDocumentFonts);
++ bool isXUL = PR_FALSE;
- if (minimumFontSize < 0)
- minimumFontSize = 0;
-@@ -3102,10 +3103,10 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
+ // See if we are in the chrome
// We only need to know this to determine if we have to use the
- // document fonts (overriding the useDocumentFonts flag), or to
- // determine if we have to override the minimum font-size constraint.
-- if ((!useDocumentFonts || minimumFontSize > 0) && mPresContext->IsChrome()) {
+ // document fonts (overriding the useDocumentFonts flag).
+- if (!useDocumentFonts && mPresContext->IsChrome()) {
+ if (mPresContext->IsChrome()) {
// if we are not using document fonts, but this is a XUL document,
// then we use the document fonts anyway
- useDocumentFonts = true;
-+ isXUL = PR_TRUE;
- minimumFontSize = 0;
++ isXUL = true;
}
-@@ -3120,9 +3121,13 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
+ // Figure out if we are a generic font
+@@ -3123,9 +3124,13 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
// generic?
nsFont::GetGenericID(font->mFont.name, &generic);
@@ -214,8 +211,8 @@ index 27336bf..827585a 100644
// Extract the generic from the specified font family...
nsAutoString genericName;
if (!font->mFont.EnumerateFamilies(ExtractGeneric, &genericName)) {
-@@ -3158,6 +3163,8 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
- minimumFontSize, font);
+@@ -3161,6 +3166,8 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
+ font);
}
+ if (font->mGenericID == kGenericFont_NONE)
diff --git a/www-client/torbrowser/files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch b/www-client/torbrowser/files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch
index f3b7aeb802f8..6ea29eb4594f 100644
--- a/www-client/torbrowser/files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch
+++ b/www-client/torbrowser/files/torbrowser-patches/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch
@@ -1,7 +1,7 @@
-From 60d369378ea65b1502ba2ab28a851318e7910a64 Mon Sep 17 00:00:00 2001
+From 09c27d0aee130959ee1aae211e9400600c26ade6 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
-Date: Wed, 6 Jun 2012 11:08:56 -0700
-Subject: [PATCH 17/18] Randomize HTTP request order and pipeline depth.
+Date: Thu, 7 Jun 2012 15:13:45 -0700
+Subject: [PATCH 17/20] Randomize HTTP request order and pipeline depth.
This is an experimental defense against
http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf
@@ -17,13 +17,13 @@ the order and concurrency of non-pipelined HTTP requests.
2 files changed, 136 insertions(+), 5 deletions(-)
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
-index 23ef893..788368f 100644
+index 463584f..e05669c 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
-@@ -94,6 +94,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr()
- {
- LOG(("Creating nsHttpConnectionMgr @%x\n", this));
+@@ -101,6 +101,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr()
mCT.Init();
+ mAlternateProtocolHash.Init(16);
+ mSpdyPreferredHash.Init();
+
+ nsresult rv;
+ mRandomGenerator = do_GetService("@mozilla.org/security/random-generator;1", &rv);
@@ -33,7 +33,7 @@ index 23ef893..788368f 100644
}
nsHttpConnectionMgr::~nsHttpConnectionMgr()
-@@ -342,8 +348,12 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline)
+@@ -380,8 +386,12 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline)
nsConnectionEntry *ent = mCT.Get(ci->HashKey());
if (ent) {
// search for another request to pipeline...
@@ -48,7 +48,7 @@ index 23ef893..788368f 100644
nsHttpTransaction *trans = ent->mPendingQ[i];
if (trans->Caps() & NS_HTTP_ALLOW_PIPELINING) {
pipeline->AddTransaction(trans);
-@@ -354,6 +364,8 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline)
+@@ -392,6 +402,8 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline)
break;
}
}
@@ -57,17 +57,17 @@ index 23ef893..788368f 100644
}
}
}
-@@ -585,12 +597,17 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
- LOG(("nsHttpConnectionMgr::ProcessPendingQForEntry [ci=%s]\n",
- ent->mConnInfo->HashKey().get()));
+@@ -922,12 +934,17 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
+
+ ProcessSpdyPendingQ(ent);
-- PRInt32 i, count = ent->mPendingQ.Length();
+- PRUint32 i, count = ent->mPendingQ.Length();
+ PRUint32 h, i = 0, count = ent->mPendingQ.Length();
if (count > 0) {
LOG((" pending-count=%u\n", count));
nsHttpTransaction *trans = nsnull;
nsHttpConnection *conn = nsnull;
-- for (i=0; i<count; ++i) {
+- for (i = 0; i < count; ++i) {
+
+ PRUint32* ind = new PRUint32[count];
+ ShuffleRequestOrder(ind, count);
@@ -77,22 +77,22 @@ index 23ef893..788368f 100644
trans = ent->mPendingQ[i];
// When this transaction has already established a half-open
-@@ -610,6 +627,7 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
- if (conn)
- break;
+@@ -951,6 +968,7 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
+ "something mutated pending queue from "
+ "GetConnection()");
}
+ delete [] ind;
if (conn) {
LOG((" dispatching pending transaction...\n"));
-@@ -694,6 +712,19 @@ nsHttpConnectionMgr::AtActiveConnectionLimit(nsConnectionEntry *ent, PRUint8 cap
+@@ -1035,6 +1053,19 @@ nsHttpConnectionMgr::AtActiveConnectionLimit(nsConnectionEntry *ent, PRUint8 cap
maxPersistConns = mMaxPersistConnsPerHost;
}
+ // Fuzz maxConns for website fingerprinting attack
+ // We create a range of maxConns/5 up to 6*maxConns/5
+ // because this function is called repeatedly, and we'll
-+ // end up converging to the high side of concurrent connections
++ // end up converging on a the high side of concurrent connections
+ // after a short while.
+ PRUint8 *bytes = nsnull;
+ nsresult rv = mRandomGenerator->GenerateRandomBytes(1, &bytes);
@@ -105,8 +105,8 @@ index 23ef893..788368f 100644
// use >= just to be safe
return (totalCount >= maxConns) || ( (caps & NS_HTTP_ALLOW_KEEPALIVE) &&
(persistCount >= maxPersistConns) );
-@@ -865,7 +896,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent,
- nsHttpPipeline *pipeline = nsnull;
+@@ -1274,7 +1305,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent,
+
if (conn->SupportsPipelining() && (caps & NS_HTTP_ALLOW_PIPELINING)) {
LOG((" looking to build pipeline...\n"));
- if (BuildPipeline(ent, trans, &pipeline))
@@ -114,7 +114,7 @@ index 23ef893..788368f 100644
trans = pipeline;
}
-@@ -938,6 +969,101 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent,
+@@ -1349,6 +1380,101 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent,
return true;
}
@@ -217,19 +217,19 @@ index 23ef893..788368f 100644
nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans)
{
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h
-index cdf21a9..81b282a 100644
+index 6b4398b..c33870f 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.h
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h
-@@ -51,6 +51,7 @@
-
+@@ -53,6 +53,7 @@
#include "nsIObserver.h"
#include "nsITimer.h"
+ #include "nsIX509Cert3.h"
+#include "nsIRandomGenerator.h"
class nsHttpPipeline;
-@@ -276,6 +277,8 @@ private:
- nsresult DispatchTransaction(nsConnectionEntry *, nsAHttpTransaction *,
+@@ -320,6 +321,8 @@ private:
+ nsresult DispatchTransaction(nsConnectionEntry *, nsHttpTransaction *,
PRUint8 caps, nsHttpConnection *);
bool BuildPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **);
+ bool BuildRandomizedPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **);
@@ -237,15 +237,15 @@ index cdf21a9..81b282a 100644
nsresult ProcessNewTransaction(nsHttpTransaction *);
nsresult EnsureSocketThreadTargetIfOnline();
void ClosePersistentConnections(nsConnectionEntry *ent);
-@@ -353,6 +356,8 @@ private:
+@@ -412,6 +415,8 @@ private:
PRUint64 mTimeOfNextWakeUp;
// Timer for next pruning of dead connections.
nsCOMPtr<nsITimer> mTimer;
+ // Random number generator for reordering HTTP pipeline
+ nsCOMPtr<nsIRandomGenerator> mRandomGenerator;
- //
- // the connection table
+ // A 1s tick to call nsHttpConnection::ReadTimeoutTick on
+ // active http/1 connections. Disabled when there are no
--
1.7.5.4
diff --git a/www-client/torbrowser/files/torbrowser-patches/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch b/www-client/torbrowser/files/torbrowser-patches/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch
new file mode 100644
index 000000000000..b4ff8981e270
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-patches/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch
@@ -0,0 +1,537 @@
+From 7c321c4d75c7c80d899db962804d288ed7db162e Mon Sep 17 00:00:00 2001
+From: Mike Perry <mikeperry-git@torproject.org>
+Date: Thu, 7 Jun 2012 15:26:13 -0700
+Subject: [PATCH 18/20] Adapt Steven Michaud's Mac crashfix patch
+
+Source is: https://bugzilla.mozilla.org/show_bug.cgi?id=715885#c35
+
+Some minor tweaks were needed to get it to apply and to compile on
+MacOS.
+---
+ widget/Makefile.in | 1 +
+ widget/cocoa/nsChildView.mm | 28 +++++++++++------
+ widget/gtk2/nsDragService.cpp | 2 +-
+ widget/gtk2/nsWindow.cpp | 2 +-
+ widget/nsIDragService.idl | 4 +--
+ widget/nsPIDragService.idl | 48 +++++++++++++++++++++++++++++
+ widget/qt/nsDragService.h | 2 +
+ widget/windows/Makefile.in | 4 ++
+ widget/windows/nsDragService.cpp | 13 +++++---
+ widget/windows/nsDragService.h | 12 +++---
+ widget/windows/nsNativeDragSource.cpp | 7 ++--
+ widget/windows/nsNativeDragTarget.cpp | 28 ++++++++++------
+ widget/windows/nsPIDragServiceWindows.idl | 46 +++++++++++++++++++++++++++
+ widget/xpwidgets/nsBaseDragService.cpp | 16 +++++++++-
+ widget/xpwidgets/nsBaseDragService.h | 9 ++---
+ 15 files changed, 176 insertions(+), 46 deletions(-)
+ create mode 100644 widget/nsPIDragService.idl
+ create mode 100644 widget/windows/nsPIDragServiceWindows.idl
+
+diff --git a/widget/Makefile.in b/widget/Makefile.in
+index 4a3405b..4c105a4 100644
+--- a/widget/Makefile.in
++++ b/widget/Makefile.in
+@@ -138,6 +138,7 @@ XPIDLSRCS = \
+ nsIClipboardDragDropHooks.idl \
+ nsIClipboardDragDropHookList.idl \
+ nsIDragSession.idl \
++ nsPIDragService.idl \
+ nsIDragService.idl \
+ nsIFormatConverter.idl \
+ nsIClipboard.idl \
+diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm
+index 0db6b1c..8d59716 100644
+--- a/widget/cocoa/nsChildView.mm
++++ b/widget/cocoa/nsChildView.mm
+@@ -4555,11 +4555,12 @@ NSEvent* gLastDragMouseDownEvent = nil;
+ if (!dragService) {
+ dragService = do_GetService(kDragServiceContractID);
+ }
++ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(dragService);
+
+ if (dragService) {
+ NSPoint pnt = [NSEvent mouseLocation];
+ FlipCocoaScreenCoordinate(pnt);
+- dragService->DragMoved(NSToIntRound(pnt.x), NSToIntRound(pnt.y));
++ dragServicePriv->DragMoved(NSToIntRound(pnt.x), NSToIntRound(pnt.y));
+ }
+ }
+
+@@ -4580,11 +4581,13 @@ NSEvent* gLastDragMouseDownEvent = nil;
+ }
+
+ if (mDragService) {
+- // set the dragend point from the current mouse location
+- nsDragService* dragService = static_cast<nsDragService *>(mDragService);
+- NSPoint pnt = [NSEvent mouseLocation];
+- FlipCocoaScreenCoordinate(pnt);
+- dragService->SetDragEndPoint(nsIntPoint(NSToIntRound(pnt.x), NSToIntRound(pnt.y)));
++ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(mDragService);
++ if (dragServicePriv) {
++ // set the dragend point from the current mouse location
++ NSPoint pnt = [NSEvent mouseLocation];
++ FlipCocoaScreenCoordinate(pnt);
++ dragServicePriv->SetDragEndPoint(NSToIntRound(pnt.x), NSToIntRound(pnt.y));
++ }
+
+ // XXX: dropEffect should be updated per |operation|.
+ // As things stand though, |operation| isn't well handled within "our"
+@@ -4595,10 +4598,15 @@ NSEvent* gLastDragMouseDownEvent = nil;
+ // value for NSDragOperationGeneric that is passed by other applications.
+ // All that said, NSDragOperationNone is still reliable.
+ if (operation == NSDragOperationNone) {
+- nsCOMPtr<nsIDOMDataTransfer> dataTransfer;
+- dragService->GetDataTransfer(getter_AddRefs(dataTransfer));
+- if (dataTransfer)
+- dataTransfer->SetDropEffectInt(nsIDragService::DRAGDROP_ACTION_NONE);
++ nsCOMPtr<nsIDragSession> dragSession;
++ mDragService->GetCurrentSession(getter_AddRefs(dragSession));
++ if (dragSession) {
++ nsCOMPtr<nsIDOMDataTransfer> dataTransfer;
++ dragSession->GetDataTransfer(getter_AddRefs(dataTransfer));
++ if (dataTransfer) {
++ dataTransfer->SetDropEffectInt(nsIDragService::DRAGDROP_ACTION_NONE);
++ }
++ }
+ }
+
+ mDragService->EndDragSession(true);
+diff --git a/widget/gtk2/nsDragService.cpp b/widget/gtk2/nsDragService.cpp
+index be8f388..99d3878 100644
+--- a/widget/gtk2/nsDragService.cpp
++++ b/widget/gtk2/nsDragService.cpp
+@@ -1332,7 +1332,7 @@ nsDragService::SourceEndDragSession(GdkDragContext *aContext,
+ GdkDisplay* display = gdk_display_get_default();
+ if (display) {
+ gdk_display_get_pointer(display, NULL, &x, &y, NULL);
+- SetDragEndPoint(nsIntPoint(x, y));
++ SetDragEndPoint(x, y);
+ }
+
+ // Either the drag was aborted or the drop occurred outside the app.
+diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp
+index 9de734e..81fe553 100644
+--- a/widget/gtk2/nsWindow.cpp
++++ b/widget/gtk2/nsWindow.cpp
+@@ -3517,7 +3517,7 @@ nsWindow::OnDragDropEvent(GtkWidget *aWidget,
+ if (display) {
+ // get the current cursor position
+ gdk_display_get_pointer(display, NULL, &x, &y, NULL);
+- ((nsDragService *)dragService.get())->SetDragEndPoint(nsIntPoint(x, y));
++ ((nsDragService *)dragService.get())->SetDragEndPoint(x, y);
+ }
+ dragService->EndDragSession(true);
+
+diff --git a/widget/nsIDragService.idl b/widget/nsIDragService.idl
+index e42c578..ef8c46f 100644
+--- a/widget/nsIDragService.idl
++++ b/widget/nsIDragService.idl
+@@ -48,7 +48,7 @@ interface nsIDOMDragEvent;
+ interface nsIDOMDataTransfer;
+ interface nsISelection;
+
+-[scriptable, uuid(82B58ADA-F490-4C3D-B737-1057C4F1D052), builtinclass]
++[scriptable, uuid(82B58ADA-F490-4C3D-B737-1057C4F1D052)]
+ interface nsIDragService : nsISupports
+ {
+ const long DRAGDROP_ACTION_NONE = 0;
+@@ -145,8 +145,6 @@ interface nsIDragService : nsISupports
+ */
+ void suppress();
+ void unsuppress();
+-
+- [noscript] void dragMoved(in long aX, in long aY);
+ };
+
+
+diff --git a/widget/nsPIDragService.idl b/widget/nsPIDragService.idl
+new file mode 100644
+index 0000000..93a144d
+--- /dev/null
++++ b/widget/nsPIDragService.idl
+@@ -0,0 +1,48 @@
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is mozilla.org code.
++ *
++ * The Initial Developer of the Original Code is
++ * The Mozilla Foundation.
++ * Portions created by the Initial Developer are Copyright (C) 2012
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * Steven Michaud <smichaud@pobox.com>
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "nsISupports.idl"
++
++[scriptable, uuid(FAD8C90B-8E1D-446A-9B6C-241486A85CBD)]
++interface nsPIDragService : nsISupports
++{
++ void dragMoved(in long aX, in long aY);
++
++ PRUint16 getInputSource();
++
++ void setDragEndPoint(in long aX, in long aY);
++};
+diff --git a/widget/qt/nsDragService.h b/widget/qt/nsDragService.h
+index 5a3e5bb..50dcfac 100644
+--- a/widget/qt/nsDragService.h
++++ b/widget/qt/nsDragService.h
+@@ -50,6 +50,8 @@ public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIDRAGSERVICE
+
++ NS_IMETHOD DragMoved(PRInt32 aX, PRInt32 aY);
++
+ nsDragService();
+
+ private:
+diff --git a/widget/windows/Makefile.in b/widget/windows/Makefile.in
+index df811ac..8d5ea4b 100644
+--- a/widget/windows/Makefile.in
++++ b/widget/windows/Makefile.in
+@@ -120,6 +120,10 @@ ifdef MOZ_ENABLE_D3D10_LAYER
+ DEFINES += -DMOZ_ENABLE_D3D10_LAYER
+ endif
+
++XPIDLSRCS += \
++ nsPIDragServiceWindows.idl \
++ $(NULL)
++
+ SHARED_LIBRARY_LIBS = \
+ ../xpwidgets/$(LIB_PREFIX)xpwidgets_s.$(LIB_SUFFIX) \
+ $(NULL)
+diff --git a/widget/windows/nsDragService.cpp b/widget/windows/nsDragService.cpp
+index b6b5b62..9657263 100644
+--- a/widget/windows/nsDragService.cpp
++++ b/widget/windows/nsDragService.cpp
+@@ -97,6 +97,8 @@ nsDragService::~nsDragService()
+ NS_IF_RELEASE(mDataObject);
+ }
+
++NS_IMPL_ISUPPORTS_INHERITED1(nsDragService, nsBaseDragService, nsPIDragServiceWindows)
++
+ bool
+ nsDragService::CreateDragImage(nsIDOMNode *aDOMNode,
+ nsIScriptableRegion *aRegion,
+@@ -347,7 +349,7 @@ nsDragService::StartInvokingDragSession(IDataObject * aDataObj,
+ POINT cpos;
+ cpos.x = GET_X_LPARAM(pos);
+ cpos.y = GET_Y_LPARAM(pos);
+- SetDragEndPoint(nsIntPoint(cpos.x, cpos.y));
++ SetDragEndPoint(cpos.x, cpos.y);
+ EndDragSession(true);
+
+ mDoingDrag = false;
+@@ -465,25 +467,26 @@ nsDragService::GetData(nsITransferable * aTransferable, PRUint32 anItem)
+
+ //---------------------------------------------------------
+ NS_IMETHODIMP
+-nsDragService::SetIDataObject(IDataObject * aDataObj)
++nsDragService::SetIDataObject(nsISupports * aDataObj)
+ {
++ IDataObject *dataObj = (IDataObject*) aDataObj;
+ // When the native drag starts the DragService gets
+ // the IDataObject that is being dragged
+ NS_IF_RELEASE(mDataObject);
+- mDataObject = aDataObj;
++ mDataObject = dataObj;
+ NS_IF_ADDREF(mDataObject);
+
+ return NS_OK;
+ }
+
+ //---------------------------------------------------------
+-void
++NS_IMETHODIMP
+ nsDragService::SetDroppedLocal()
+ {
+ // Sent from the native drag handler, letting us know
+ // a drop occurred within the application vs. outside of it.
+ mSentLocalDropEvent = true;
+- return;
++ return NS_OK;
+ }
+
+ //-------------------------------------------------------------------------
+diff --git a/widget/windows/nsDragService.h b/widget/windows/nsDragService.h
+index 87d6cc9..04c8746 100644
+--- a/widget/windows/nsDragService.h
++++ b/widget/windows/nsDragService.h
+@@ -39,6 +39,7 @@
+ #define nsDragService_h__
+
+ #include "nsBaseDragService.h"
++#include "nsPIDragServiceWindows.h"
+ #include <windows.h>
+ #include <shlobj.h>
+
+@@ -52,12 +53,15 @@ class nsString;
+ * Native Win32 DragService wrapper
+ */
+
+-class nsDragService : public nsBaseDragService
++class nsDragService : public nsBaseDragService, public nsPIDragServiceWindows
+ {
+ public:
+ nsDragService();
+ virtual ~nsDragService();
+-
++
++ NS_DECL_ISUPPORTS_INHERITED
++ NS_DECL_NSPIDRAGSERVICEWINDOWS
++
+ // nsIDragService
+ NS_IMETHOD InvokeDragSession(nsIDOMNode *aDOMNode,
+ nsISupportsArray *anArrayTransferables,
+@@ -71,13 +75,9 @@ public:
+ NS_IMETHOD EndDragSession(bool aDoneDrag);
+
+ // native impl.
+- NS_IMETHOD SetIDataObject(IDataObject * aDataObj);
+ NS_IMETHOD StartInvokingDragSession(IDataObject * aDataObj,
+ PRUint32 aActionType);
+
+- // A drop occurred within the application vs. outside of it.
+- void SetDroppedLocal();
+-
+ protected:
+ nsDataObjCollection* GetDataObjCollection(IDataObject * aDataObj);
+
+diff --git a/widget/windows/nsNativeDragSource.cpp b/widget/windows/nsNativeDragSource.cpp
+index e51101e..0fe6ffe 100644
+--- a/widget/windows/nsNativeDragSource.cpp
++++ b/widget/windows/nsNativeDragSource.cpp
+@@ -42,7 +42,7 @@
+ #include "nsIServiceManager.h"
+ #include "nsToolkit.h"
+ #include "nsWidgetsCID.h"
+-#include "nsIDragService.h"
++#include "nsDragService.h"
+
+ static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID);
+
+@@ -101,9 +101,10 @@ STDMETHODIMP
+ nsNativeDragSource::QueryContinueDrag(BOOL fEsc, DWORD grfKeyState)
+ {
+ nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID);
+- if (dragService) {
++ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(dragService);
++ if (dragServicePriv) {
+ DWORD pos = ::GetMessagePos();
+- dragService->DragMoved(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
++ dragServicePriv->DragMoved(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
+ }
+
+ if (fEsc) {
+diff --git a/widget/windows/nsNativeDragTarget.cpp b/widget/windows/nsNativeDragTarget.cpp
+index 3362ca6..a69817c 100644
+--- a/widget/windows/nsNativeDragTarget.cpp
++++ b/widget/windows/nsNativeDragTarget.cpp
+@@ -205,7 +205,11 @@ nsNativeDragTarget::DispatchDragDropEvent(PRUint32 aEventType, POINTL aPT)
+ event.isControl = IsKeyDown(NS_VK_CONTROL);
+ event.isMeta = false;
+ event.isAlt = IsKeyDown(NS_VK_ALT);
+- event.inputSource = static_cast<nsBaseDragService*>(mDragService)->GetInputSource();
++ event.inputSource = 0;
++ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(mDragService);
++ if (dragServicePriv) {
++ dragServicePriv->GetInputSource(&event.inputSource);
++ }
+
+ mWindow->DispatchEvent(&event, status);
+ }
+@@ -292,9 +296,8 @@ nsNativeDragTarget::DragEnter(LPDATAOBJECT pIDataSource,
+ // This cast is ok because in the constructor we created a
+ // the actual implementation we wanted, so we know this is
+ // a nsDragService. It should be a private interface, though.
+- nsDragService * winDragService =
+- static_cast<nsDragService *>(mDragService);
+- winDragService->SetIDataObject(pIDataSource);
++ nsCOMPtr<nsPIDragServiceWindows> winDragService = do_QueryInterface(mDragService);
++ winDragService->SetIDataObject((nsISupports*)pIDataSource);
+
+ // Now process the native drag state and then dispatch the event
+ ProcessDrag(NS_DRAGDROP_ENTER, grfKeyState, ptl, pdwEffect);
+@@ -432,8 +435,8 @@ nsNativeDragTarget::Drop(LPDATAOBJECT pData,
+ // This cast is ok because in the constructor we created a
+ // the actual implementation we wanted, so we know this is
+ // a nsDragService (but it should still be a private interface)
+- nsDragService* winDragService = static_cast<nsDragService*>(mDragService);
+- winDragService->SetIDataObject(pData);
++ nsCOMPtr<nsPIDragServiceWindows> winDragService = do_QueryInterface(mDragService);
++ winDragService->SetIDataObject((nsISupports*)pData);
+
+ // NOTE: ProcessDrag spins the event loop which may destroy arbitrary objects.
+ // We use strong refs to prevent it from destroying these:
+@@ -457,11 +460,14 @@ nsNativeDragTarget::Drop(LPDATAOBJECT pData,
+ // tell the drag service we're done with the session
+ // Use GetMessagePos to get the position of the mouse at the last message
+ // seen by the event loop. (Bug 489729)
+- DWORD pos = ::GetMessagePos();
+- POINT cpos;
+- cpos.x = GET_X_LPARAM(pos);
+- cpos.y = GET_Y_LPARAM(pos);
+- winDragService->SetDragEndPoint(nsIntPoint(cpos.x, cpos.y));
++ nsCOMPtr<nsPIDragService> dragServicePriv = do_QueryInterface(mDragService);
++ if (dragServicePriv) {
++ DWORD pos = ::GetMessagePos();
++ POINT cpos;
++ cpos.x = GET_X_LPARAM(pos);
++ cpos.y = GET_Y_LPARAM(pos);
++ dragServicePriv->SetDragEndPoint(cpos.x, cpos.y);
++ }
+ serv->EndDragSession(true);
+
+ // release the ref that was taken in DragEnter
+diff --git a/widget/windows/nsPIDragServiceWindows.idl b/widget/windows/nsPIDragServiceWindows.idl
+new file mode 100644
+index 0000000..c8a46dd
+--- /dev/null
++++ b/widget/windows/nsPIDragServiceWindows.idl
+@@ -0,0 +1,46 @@
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is mozilla.org code.
++ *
++ * The Initial Developer of the Original Code is
++ * The Mozilla Foundation.
++ * Portions created by the Initial Developer are Copyright (C) 2012
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * Steven Michaud <smichaud@pobox.com>
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "nsISupports.idl"
++
++[scriptable, uuid(6FC2117D-5EB4-441A-9C12-62A783BEBC0C)]
++interface nsPIDragServiceWindows : nsISupports
++{
++ void setIDataObject(in nsISupports aDataObj);
++
++ void setDroppedLocal();
++};
+diff --git a/widget/xpwidgets/nsBaseDragService.cpp b/widget/xpwidgets/nsBaseDragService.cpp
+index 342a036..87e28f7 100644
+--- a/widget/xpwidgets/nsBaseDragService.cpp
++++ b/widget/xpwidgets/nsBaseDragService.cpp
+@@ -88,7 +88,7 @@ nsBaseDragService::~nsBaseDragService()
+ {
+ }
+
+-NS_IMPL_ISUPPORTS2(nsBaseDragService, nsIDragService, nsIDragSession)
++NS_IMPL_ISUPPORTS3(nsBaseDragService, nsIDragService, nsPIDragService, nsIDragSession)
+
+ //---------------------------------------------------------
+ NS_IMETHODIMP
+@@ -436,6 +436,20 @@ nsBaseDragService::DragMoved(PRInt32 aX, PRInt32 aY)
+ return NS_OK;
+ }
+
++NS_IMETHODIMP
++nsBaseDragService::SetDragEndPoint(PRInt32 aX, PRInt32 aY)
++{
++ mEndDragPoint = nsIntPoint(aX, aY);
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsBaseDragService::GetInputSource(PRUint16* aInputSource)
++{
++ *aInputSource = mInputSource;
++ return NS_OK;
++}
++
+ static nsIPresShell*
+ GetPresShellForContent(nsIDOMNode* aDOMNode)
+ {
+diff --git a/widget/xpwidgets/nsBaseDragService.h b/widget/xpwidgets/nsBaseDragService.h
+index 290c0cb..2ceac2b 100644
+--- a/widget/xpwidgets/nsBaseDragService.h
++++ b/widget/xpwidgets/nsBaseDragService.h
+@@ -39,6 +39,7 @@
+ #define nsBaseDragService_h__
+
+ #include "nsIDragService.h"
++#include "nsPIDragService.h"
+ #include "nsIDragSession.h"
+ #include "nsITransferable.h"
+ #include "nsISupportsArray.h"
+@@ -64,6 +65,7 @@ class nsICanvasElementExternal;
+ */
+
+ class nsBaseDragService : public nsIDragService,
++ public nsPIDragService,
+ public nsIDragSession
+ {
+
+@@ -74,14 +76,11 @@ public:
+ //nsISupports
+ NS_DECL_ISUPPORTS
+
+- //nsIDragSession and nsIDragService
++ //nsIDragSession, nsIDragService and nsPIDragService
+ NS_DECL_NSIDRAGSERVICE
++ NS_DECL_NSPIDRAGSERVICE
+ NS_DECL_NSIDRAGSESSION
+
+- void SetDragEndPoint(nsIntPoint aEndDragPoint) { mEndDragPoint = aEndDragPoint; }
+-
+- PRUint16 GetInputSource() { return mInputSource; }
+-
+ protected:
+
+ /**
+--
+1.7.5.4
+
diff --git a/www-client/torbrowser/files/torbrowser-patches/0018-Add-HTTP-auth-headers-before-the-modify-request-obse.patch b/www-client/torbrowser/files/torbrowser-patches/0018-Add-HTTP-auth-headers-before-the-modify-request-obse.patch
deleted file mode 100644
index 1f18aa5d4564..000000000000
--- a/www-client/torbrowser/files/torbrowser-patches/0018-Add-HTTP-auth-headers-before-the-modify-request-obse.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 8c741c1ee9b05e23582047df6179bc7344864011 Mon Sep 17 00:00:00 2001
-From: Mike Perry <mikeperry-git@fscked.org>
-Date: Fri, 2 Sep 2011 15:33:20 -0700
-Subject: [PATCH 18/18] Add HTTP auth headers before the modify-request
- observer.
-
-Otherwise, how are we supposed to modify them?
-
-Thanks to Georg Koppen for spotting both the problem and this fix.
----
- netwerk/protocol/http/nsHttpChannel.cpp | 11 +++++++----
- 1 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
-index 97bd84c..6205d62 100644
---- a/netwerk/protocol/http/nsHttpChannel.cpp
-+++ b/netwerk/protocol/http/nsHttpChannel.cpp
-@@ -316,9 +316,6 @@ nsHttpChannel::Connect(bool firstTime)
- return NS_ERROR_DOCUMENT_NOT_CACHED;
- }
-
-- // check to see if authorization headers should be included
-- mAuthProvider->AddAuthorizationHeaders();
--
- if (mLoadFlags & LOAD_NO_NETWORK_IO) {
- return NS_ERROR_DOCUMENT_NOT_CACHED;
- }
-@@ -3707,6 +3704,9 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context)
-
- AddCookiesToRequest();
-
-+ // check to see if authorization headers should be included
-+ mAuthProvider->AddAuthorizationHeaders();
-+
- // notify "http-on-modify-request" observers
- gHttpHandler->OnModifyRequest(this);
-
-@@ -4817,7 +4817,10 @@ nsHttpChannel::DoAuthRetry(nsAHttpConnection *conn)
- // this authentication attempt (bug 84794).
- // TODO: save cookies from auth response and send them here (bug 572151).
- AddCookiesToRequest();
--
-+
-+ // check to see if authorization headers should be included
-+ mAuthProvider->AddAuthorizationHeaders();
-+
- // notify "http-on-modify-request" observers
- gHttpHandler->OnModifyRequest(this);
-
---
-1.7.5.4
-
diff --git a/www-client/torbrowser/files/torbrowser-patches/0019-Fix-Firefox-13-build-process.patch b/www-client/torbrowser/files/torbrowser-patches/0019-Fix-Firefox-13-build-process.patch
new file mode 100644
index 000000000000..4ac5d0acb7ee
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-patches/0019-Fix-Firefox-13-build-process.patch
@@ -0,0 +1,138 @@
+From 41f44964edbee300c098d110be3f029ebb711081 Mon Sep 17 00:00:00 2001
+From: Mike Perry <mikeperry-git@torproject.org>
+Date: Fri, 8 Jun 2012 12:42:25 -0700
+Subject: [PATCH 19/20] Fix Firefox 13 build process.
+
+Patch is from https://bugzilla.mozilla.org/show_bug.cgi?id=736961.
+---
+ config/rules.mk | 4 ++--
+ js/src/config/rules.mk | 4 ++--
+ js/xpconnect/src/Makefile.in | 10 +++++-----
+ xpcom/idl-parser/Makefile.in | 2 +-
+ xpcom/typelib/xpidl/Makefile.in | 4 ++--
+ 5 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/config/rules.mk b/config/rules.mk
+index e6353e1..c65c1f3 100644
+--- a/config/rules.mk
++++ b/config/rules.mk
+@@ -1479,7 +1479,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done
+ $(PYTHON_PATH) \
+ -I$(topsrcdir)/other-licenses/ply \
+ -I$(topsrcdir)/xpcom/idl-parser \
+- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
++ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
+ @if test -n "$(findstring $*.h, $(EXPORTS))"; \
+ then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
+
+@@ -1492,7 +1492,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done
+ -I$(topsrcdir)/other-licenses/ply \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ -I$(topsrcdir)/xpcom/typelib/xpt/tools \
+- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
++ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
+
+ # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
+ ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
+diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk
+index e6353e1..c65c1f3 100644
+--- a/js/src/config/rules.mk
++++ b/js/src/config/rules.mk
+@@ -1479,7 +1479,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done
+ $(PYTHON_PATH) \
+ -I$(topsrcdir)/other-licenses/ply \
+ -I$(topsrcdir)/xpcom/idl-parser \
+- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
++ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
+ @if test -n "$(findstring $*.h, $(EXPORTS))"; \
+ then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
+
+@@ -1492,7 +1492,7 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(XPIDL_GEN_DIR)/.done
+ -I$(topsrcdir)/other-licenses/ply \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ -I$(topsrcdir)/xpcom/typelib/xpt/tools \
+- $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
++ $(topsrcdir)/xpcom/idl-parser/typelib.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache $(XPIDL_FLAGS) $(_VPATH_SRCS) -d $(MDDEPDIR)/$(@F).pp -o $@
+
+ # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
+ ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
+diff --git a/js/xpconnect/src/Makefile.in b/js/xpconnect/src/Makefile.in
+index 7dc7812..a369bcd 100644
+--- a/js/xpconnect/src/Makefile.in
++++ b/js/xpconnect/src/Makefile.in
+@@ -151,7 +151,7 @@ dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ $(srcdir)/qsgen.py \
+ --idlpath=$(DEPTH)/dist/idl \
+- --cachedir=$(DEPTH)/xpcom/idl-parser \
++ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
+ --header-output dom_quickstubs.h \
+ --stub-output dom_quickstubs.cpp \
+ --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
+@@ -172,7 +172,7 @@ dombindings_gen.h: $(srcdir)/dombindings.conf \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ $(srcdir)/dombindingsgen.py \
+ --idlpath=$(DEPTH)/dist/idl \
+- --cachedir=$(DEPTH)/xpcom/idl-parser \
++ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
+ --header-output dombindings_gen.h \
+ $(srcdir)/dombindings.conf
+
+@@ -189,7 +189,7 @@ dombindings_gen.cpp: $(srcdir)/dombindings.conf \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ $(srcdir)/dombindingsgen.py \
+ --idlpath=$(DEPTH)/dist/idl \
+- --cachedir=$(DEPTH)/xpcom/idl-parser \
++ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
+ --stub-output dombindings_gen.cpp \
+ --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \
+ $(srcdir)/dombindings.conf
+@@ -208,7 +208,7 @@ DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.conf \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ $(srcdir)/dictionary_helper_gen.py \
+ -I $(DEPTH)/dist/idl \
+- --cachedir=$(DEPTH)/xpcom/idl-parser \
++ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
+ --header-output DictionaryHelpers.h \
+ $(srcdir)/dictionary_helper_gen.conf
+
+@@ -223,7 +223,7 @@ DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \
+ -I$(topsrcdir)/xpcom/idl-parser \
+ $(srcdir)/dictionary_helper_gen.py \
+ -I $(DEPTH)/dist/idl \
+- --cachedir=$(DEPTH)/xpcom/idl-parser \
++ --cachedir=$(DEPTH)/xpcom/idl-parser/cache \
+ --header-output DictionaryHelpers.h \
+ --stub-output DictionaryHelpers.cpp \
+ --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
+diff --git a/xpcom/idl-parser/Makefile.in b/xpcom/idl-parser/Makefile.in
+index f5ff178..97390c5 100644
+--- a/xpcom/idl-parser/Makefile.in
++++ b/xpcom/idl-parser/Makefile.in
+@@ -61,7 +61,7 @@ export:: $(PARSER_SRCS) $(PLY_PROGS)
+ $(PYTHON_PATH) \
+ -I$(topsrcdir)/other-licenses/ply \
+ -I$(topsrcdir)/xpcom/idl-parser \
+- $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=. --regen
++ $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache --regen
+
+ check::
+ $(PYTHON_PATH) \
+diff --git a/xpcom/typelib/xpidl/Makefile.in b/xpcom/typelib/xpidl/Makefile.in
+index bcae13a..4edda5d 100644
+--- a/xpcom/typelib/xpidl/Makefile.in
++++ b/xpcom/typelib/xpidl/Makefile.in
+@@ -48,8 +48,8 @@ SDK_BINARY = \
+ $(topsrcdir)/xpcom/idl-parser/xpidl.py \
+ $(topsrcdir)/xpcom/idl-parser/header.py \
+ $(topsrcdir)/xpcom/idl-parser/typelib.py \
+- $(DEPTH)/xpcom/idl-parser/xpidllex.py \
+- $(DEPTH)/xpcom/idl-parser/xpidlyacc.py \
++ $(DEPTH)/xpcom/idl-parser/cache/xpidllex.py \
++ $(DEPTH)/xpcom/idl-parser/cache/xpidlyacc.py \
+ $(NULL)
+
+ ifndef MOZ_SYSTEM_PLY
+--
+1.7.5.4
+
diff --git a/www-client/torbrowser/files/torbrowser-patches/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch b/www-client/torbrowser/files/torbrowser-patches/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch
new file mode 100644
index 000000000000..d66f79a53c9f
--- /dev/null
+++ b/www-client/torbrowser/files/torbrowser-patches/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch
@@ -0,0 +1,45 @@
+From fb210909f6fd3a4a5253101d44edc8c884bf6c04 Mon Sep 17 00:00:00 2001
+From: Mike Perry <mikeperry-git@torproject.org>
+Date: Wed, 20 Jun 2012 15:26:11 -0700
+Subject: [PATCH 20/20] Fix 'internal compile error' for sub-ancient GCCs.
+
+Also fix a related null pointer deref.
+---
+ netwerk/protocol/http/HttpChannelParent.cpp | 13 ++++++++++---
+ 1 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp
+index c0d2fff..982c4e0 100644
+--- a/netwerk/protocol/http/HttpChannelParent.cpp
++++ b/netwerk/protocol/http/HttpChannelParent.cpp
+@@ -333,8 +333,13 @@ HttpChannelParent::RecvUpdateAssociatedContentSecurity(const PRInt32& high,
+
+ // Bug 621446 investigation, we don't want conditional PR_Aborts bellow to be
+ // merged to a single address.
+-#pragma warning(disable : 4068)
++// Compiling with a version of GCC <= 4.4 fails with an internal compiler
++// error.
++#if !defined(__GNUC__) || \
++ (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+ #pragma GCC optimize ("O0")
++#pragma warning(disable : 4068)
++#endif
+
+ bool
+ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
+@@ -369,8 +374,10 @@ HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
+
+ mReceivedRedirect2Verify = true;
+
+- mRedirectCallback->OnRedirectVerifyCallback(result);
+- mRedirectCallback = nsnull;
++ if (mRedirectCallback) {
++ mRedirectCallback->OnRedirectVerifyCallback(result);
++ mRedirectCallback = nsnull;
++ }
+ return true;
+ }
+
+--
+1.7.5.4
+
diff --git a/www-client/torbrowser/torbrowser-10.0.5.ebuild b/www-client/torbrowser/torbrowser-13.0.ebuild
index 8a909553e2f3..4a74b2448c22 100644
--- a/www-client/torbrowser/torbrowser-10.0.5.ebuild
+++ b/www-client/torbrowser/torbrowser-13.0.ebuild
@@ -1,16 +1,16 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/torbrowser-10.0.5.ebuild,v 1.1 2012/06/06 22:21:08 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/torbrowser/torbrowser-13.0.ebuild,v 1.1 2012/06/30 20:43:10 hasufell Exp $
EAPI="3"
VIRTUALX_REQUIRED="pgo"
WANT_AUTOCONF="2.1"
-MOZ_ESR="1"
+MOZ_ESR=""
MY_PN="firefox"
# latest version of the torbrowser-bundle we use the profile-folder from
# https://www.torproject.org/dist/torbrowser/linux/
-TB_V="2.2.36-1"
+TB_V="2.2.37-1"
MOZ_P="${MY_PN}-${PV}"
@@ -20,7 +20,7 @@ if [[ ${MOZ_ESR} == 1 ]]; then
fi
# Patch version
-PATCH="${MY_PN}-10.0-patches-0.8"
+PATCH="${MY_PN}-13.0-patches-0.2"
# Upstream ftp release URI that's used by mozlinguas.eclass
# We don't use the http mirror because it deletes old tarballs.
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${MY_PN}/releases/"
@@ -58,9 +58,9 @@ RDEPEND="
>=dev-libs/nspr-4.9.1
>=dev-libs/glib-2.26:2
>=media-libs/mesa-7.10
- media-libs/libpng[apng]
+ >=media-libs/libpng-1.5.9[apng]
virtual/libffi
- system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
+ system-sqlite? ( >=dev-db/sqlite-3.7.10[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
webm? ( >=media-libs/libvpx-1.0.0
media-libs/alsa-lib )
crashreporter? ( net-misc/curl )
@@ -128,7 +128,7 @@ src_prepare() {
# Torbrowser patches for firefox 10.0.5esr, check regularly/for every version-bump
# https://gitweb.torproject.org/torbrowser.git/history/HEAD:/src/current-patches
# exclude vidalia patch, cause we don't force the user to use it
- EPATCH_EXCLUDE="0007-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch" \
+ EPATCH_EXCLUDE="0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch" \
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${FILESDIR}/${PN}-patches"
@@ -196,6 +196,8 @@ src_configure() {
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
+ mozconfig_use_enable system-sqlite
+
# Allow for a proper pgo build
if use pgo; then
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig