[tor-commits] [torbrowser/master] Rebase TBB alpha patches for FF14.

mikeperry at torproject.org mikeperry at torproject.org
Mon Jul 23 23:14:13 UTC 2012


commit 604844cea21297acccb44b486a4167a52d198918
Author: Mike Perry <mikeperry-git at fscked.org>
Date:   Mon Jul 23 16:08:12 2012 -0700

    Rebase TBB alpha patches for FF14.
---
 ...nents.interfaces-lookupMethod-from-conten.patch |   10 +-
 ...0002-Make-Permissions-Manager-memory-only.patch |    4 +-
 ...-Make-Intermediate-Cert-Store-memory-only.patch |    8 +-
 .../alpha/0004-Add-a-string-based-cacheKey.patch   |   14 +-
 .../0005-Block-all-plugins-except-flash.patch      |   14 +-
 ...ontent-pref-service-memory-only-clearable.patch |    4 +-
 .../0007-Disable-SSL-Session-ID-tracking.patch     |    6 +-
 ...observer-event-to-close-persistent-connec.patch |   22 +-
 ...ice-and-system-specific-CSS-Media-Queries.patch |    4 +-
 .../alpha/0010-Rebrand-Firefox-to-TorBrowser.patch |    4 +-
 .../0011-Make-Download-manager-memory-only.patch   |   12 +-
 .../0012-Add-DDG-and-StartPage-to-Omnibox.patch    |    4 +-
 ...-nsICacheService.EvictEntries-synchronous.patch |    8 +-
 .../alpha/0014-Prevent-WebSocket-DNS-leak.patch    |    8 +-
 ...owser-exit-when-not-launched-from-Vidalia.patch |    8 +-
 ...16-Limit-the-number-of-fonts-per-document.patch |   16 +-
 ...ize-HTTP-request-order-and-pipeline-depth.patch |  264 ++++++--------------
 ...Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch |   61 +++--
 .../alpha/0019-Fix-Firefox-13-build-process.patch  |  138 ----------
 .../alpha/0019-Fix-Firefox-build-process.patch     |  267 ++++++++++++++++++++
 ...ternal-compile-error-for-sub-ancient-GCCs.patch |   45 ----
 21 files changed, 456 insertions(+), 465 deletions(-)

diff --git a/src/current-patches/firefox/alpha/0001-Block-Components.interfaces-lookupMethod-from-conten.patch b/src/current-patches/firefox/alpha/0001-Block-Components.interfaces-lookupMethod-from-conten.patch
index fe7ff85..31805de 100644
--- a/src/current-patches/firefox/alpha/0001-Block-Components.interfaces-lookupMethod-from-conten.patch
+++ b/src/current-patches/firefox/alpha/0001-Block-Components.interfaces-lookupMethod-from-conten.patch
@@ -1,7 +1,7 @@
-From 801d2dcc512ca5e64b72d56faaab7d8ef0fadf39 Mon Sep 17 00:00:00 2001
+From 497c96e0d9be60c3c4d61edf6162aff22ee9f4fc Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Wed, 1 Feb 2012 15:40:40 -0800
-Subject: [PATCH 01/20] Block Components.interfaces,lookupMethod from content
+Subject: [PATCH 01/19] 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 a2a1102..49e4c7e 100644
+index ad39de5..cf11c20 100644
 --- a/js/xpconnect/src/XPCComponents.cpp
 +++ b/js/xpconnect/src/XPCComponents.cpp
-@@ -4287,7 +4287,9 @@ nsXPCComponents::CanCreateWrapper(const nsIID * iid, char **_retval)
+@@ -4636,7 +4636,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 a2a1102..49e4c7e 100644
      *_retval = xpc_CheckAccessList(methodName, allowed);
      return NS_OK;
  }
-@@ -4296,7 +4298,9 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c
+@@ -4645,7 +4647,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/src/current-patches/firefox/alpha/0002-Make-Permissions-Manager-memory-only.patch b/src/current-patches/firefox/alpha/0002-Make-Permissions-Manager-memory-only.patch
index 524ca62..682aa52 100644
--- a/src/current-patches/firefox/alpha/0002-Make-Permissions-Manager-memory-only.patch
+++ b/src/current-patches/firefox/alpha/0002-Make-Permissions-Manager-memory-only.patch
@@ -1,7 +1,7 @@
-From 4c65de64fc28ca767009a0d0acfcefd8f2a73ad8 Mon Sep 17 00:00:00 2001
+From 167d0ac069fa5d50f679636d690171b4fd4ac5a2 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Wed, 1 Feb 2012 15:45:16 -0800
-Subject: [PATCH 02/20] Make Permissions Manager memory-only
+Subject: [PATCH 02/19] 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
diff --git a/src/current-patches/firefox/alpha/0003-Make-Intermediate-Cert-Store-memory-only.patch b/src/current-patches/firefox/alpha/0003-Make-Intermediate-Cert-Store-memory-only.patch
index bb97b2d..cbcefc3 100644
--- a/src/current-patches/firefox/alpha/0003-Make-Intermediate-Cert-Store-memory-only.patch
+++ b/src/current-patches/firefox/alpha/0003-Make-Intermediate-Cert-Store-memory-only.patch
@@ -1,7 +1,7 @@
-From 6b5b4816ffff9875f8fd3364841fde872a2af7a4 Mon Sep 17 00:00:00 2001
+From 157823ac6088b718c12267593ae99003c71a29df Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at fscked.org>
 Date: Fri, 19 Aug 2011 17:58:23 -0700
-Subject: [PATCH 03/20] Make Intermediate Cert Store memory-only.
+Subject: [PATCH 03/19] 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 89ad70e..783d0d2 100644
+index 5204d75..60c0eb7 100644
 --- a/security/manager/ssl/src/nsNSSComponent.cpp
 +++ b/security/manager/ssl/src/nsNSSComponent.cpp
-@@ -1755,8 +1755,21 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
+@@ -1781,8 +1781,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/src/current-patches/firefox/alpha/0004-Add-a-string-based-cacheKey.patch b/src/current-patches/firefox/alpha/0004-Add-a-string-based-cacheKey.patch
index b33a628..9ee780b 100644
--- a/src/current-patches/firefox/alpha/0004-Add-a-string-based-cacheKey.patch
+++ b/src/current-patches/firefox/alpha/0004-Add-a-string-based-cacheKey.patch
@@ -1,7 +1,7 @@
-From b2dfbf250bc83592e73abf932c5301f1688a277b Mon Sep 17 00:00:00 2001
+From 0abaf15bf59d5d742511642c1f05127058c557b9 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at fscked.org>
 Date: Fri, 2 Sep 2011 20:47:02 -0700
-Subject: [PATCH 04/20] Add a string-based cacheKey.
+Subject: [PATCH 04/19] 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 34291f4..92f2d7d 100644
+index 3f63c27..23edc3c 100644
 --- a/netwerk/protocol/http/nsHttpChannel.cpp
 +++ b/netwerk/protocol/http/nsHttpChannel.cpp
-@@ -2415,6 +2415,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID,
+@@ -2540,6 +2540,12 @@ nsHttpChannel::AssembleCacheKey(const char *spec, PRUint32 postID,
          cacheKey.Append(buf);
      }
  
@@ -45,7 +45,7 @@ index 34291f4..92f2d7d 100644
      if (!cacheKey.IsEmpty()) {
          cacheKey.AppendLiteral("uri=");
      }
-@@ -4784,6 +4790,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value)
+@@ -4910,6 +4916,22 @@ nsHttpChannel::SetCacheForOfflineUse(bool value)
  }
  
  NS_IMETHODIMP
@@ -69,10 +69,10 @@ index 34291f4..92f2d7d 100644
  {
      value = mOfflineCacheClientID;
 diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h
-index f8e59fe..a5b7d1e 100644
+index c3935f5..5a61e21 100644
 --- a/netwerk/protocol/http/nsHttpChannel.h
 +++ b/netwerk/protocol/http/nsHttpChannel.h
-@@ -306,6 +306,7 @@ private:
+@@ -311,6 +311,7 @@ private:
      nsCOMPtr<nsICacheEntryDescriptor> mOfflineCacheEntry;
      nsCacheAccessMode                 mOfflineCacheAccess;
      nsCString                         mOfflineCacheClientID;
diff --git a/src/current-patches/firefox/alpha/0005-Block-all-plugins-except-flash.patch b/src/current-patches/firefox/alpha/0005-Block-all-plugins-except-flash.patch
index 2cfa7ba..cbfee28 100644
--- a/src/current-patches/firefox/alpha/0005-Block-all-plugins-except-flash.patch
+++ b/src/current-patches/firefox/alpha/0005-Block-all-plugins-except-flash.patch
@@ -1,7 +1,7 @@
-From 47235106c9e1257c66bab774aab330be4dabcfb0 Mon Sep 17 00:00:00 2001
+From eb378defcebed631d488d2e20d1c3a063f9efce3 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Wed, 1 Feb 2012 15:50:15 -0800
-Subject: [PATCH 05/20] Block all plugins except flash.
+Subject: [PATCH 05/19] 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 0c3efa0..e607e68 100644
+index a4e5982..9f63789 100644
 --- a/dom/plugins/base/nsPluginHost.cpp
 +++ b/dom/plugins/base/nsPluginHost.cpp
-@@ -2002,6 +2002,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag)
+@@ -1944,6 +1944,35 @@ bool nsPluginHost::IsDuplicatePlugin(nsPluginTag * aPluginTag)
    return false;
  }
  
@@ -56,7 +56,7 @@ index 0c3efa0..e607e68 100644
  typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void);
  
  nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
-@@ -2135,6 +2164,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
+@@ -2077,6 +2106,10 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
        continue;
      }
  
@@ -68,10 +68,10 @@ index 0c3efa0..e607e68 100644
      if (!pluginTag) {
        nsPluginFile pluginFile(localfile);
 diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h
-index 1b46957..4f1e890 100644
+index e8b4ad5..cc783ce 100644
 --- a/dom/plugins/base/nsPluginHost.h
 +++ b/dom/plugins/base/nsPluginHost.h
-@@ -285,6 +285,8 @@ private:
+@@ -284,6 +284,8 @@ private:
    // Loads all cached plugins info into mCachedPlugins
    nsresult ReadPluginInfo();
  
diff --git a/src/current-patches/firefox/alpha/0006-Make-content-pref-service-memory-only-clearable.patch b/src/current-patches/firefox/alpha/0006-Make-content-pref-service-memory-only-clearable.patch
index 77f9e41..31c49e6 100644
--- a/src/current-patches/firefox/alpha/0006-Make-content-pref-service-memory-only-clearable.patch
+++ b/src/current-patches/firefox/alpha/0006-Make-content-pref-service-memory-only-clearable.patch
@@ -1,7 +1,7 @@
-From bd560666419266a862d5b0387c7941c8ef7bb624 Mon Sep 17 00:00:00 2001
+From 85b0de664cde83b0a0dff2ba973ace3f9aa6221b Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at fscked.org>
 Date: Thu, 8 Sep 2011 08:40:17 -0700
-Subject: [PATCH 06/20] Make content pref service memory-only + clearable
+Subject: [PATCH 06/19] 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
diff --git a/src/current-patches/firefox/alpha/0007-Disable-SSL-Session-ID-tracking.patch b/src/current-patches/firefox/alpha/0007-Disable-SSL-Session-ID-tracking.patch
index 1f19c8a..4aa36dc 100644
--- a/src/current-patches/firefox/alpha/0007-Disable-SSL-Session-ID-tracking.patch
+++ b/src/current-patches/firefox/alpha/0007-Disable-SSL-Session-ID-tracking.patch
@@ -1,7 +1,7 @@
-From 3eebe3b7e2882de39e2c686a38e7084cccfa4c60 Mon Sep 17 00:00:00 2001
+From fdc588cee6af4192360775caa4d2f0d25c8727bd Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at fscked.org>
 Date: Wed, 7 Dec 2011 19:36:38 -0800
-Subject: [PATCH 07/20] Disable SSL Session ID tracking.
+Subject: [PATCH 07/19] 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
@@ -11,7 +11,7 @@ https://www.torproject.org/projects/torbrowser/design/#identifier-linkability.
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c
-index 28e6210..fa48ecd 100644
+index 0c4d0c7..8d23fc0 100644
 --- a/security/nss/lib/ssl/sslsock.c
 +++ b/security/nss/lib/ssl/sslsock.c
 @@ -173,7 +173,7 @@ static sslOptions ssl_defaults = {
diff --git a/src/current-patches/firefox/alpha/0008-Provide-an-observer-event-to-close-persistent-connec.patch b/src/current-patches/firefox/alpha/0008-Provide-an-observer-event-to-close-persistent-connec.patch
index 1de839e..2eb308e 100644
--- a/src/current-patches/firefox/alpha/0008-Provide-an-observer-event-to-close-persistent-connec.patch
+++ b/src/current-patches/firefox/alpha/0008-Provide-an-observer-event-to-close-persistent-connec.patch
@@ -1,7 +1,7 @@
-From 9594d3f2df4f20308406deea30aaccd577587438 Mon Sep 17 00:00:00 2001
+From 1b4b8d3e22bf6d344b92953ad6e46d2d0577988b Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
-Date: Wed, 1 Feb 2012 15:53:28 -0800
-Subject: [PATCH 08/20] Provide an observer event to close persistent
+Date: Thu, 19 Jul 2012 19:02:39 -0700
+Subject: [PATCH 08/19] Provide an observer event to close persistent
  connections
 
 We need to prevent linkability across "New Identity", which includes closing
@@ -11,20 +11,20 @@ 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 dcdf729..672d436 100644
+index 56bca0e..2d8afa0 100644
 --- a/netwerk/protocol/http/nsHttpHandler.cpp
 +++ b/netwerk/protocol/http/nsHttpHandler.cpp
-@@ -338,6 +338,7 @@ nsHttpHandler::Init()
+@@ -344,6 +344,7 @@ nsHttpHandler::Init()
+         mObserverService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, true);
          mObserverService->AddObserver(this, "net:clear-active-logins", true);
          mObserverService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, true);
++        mObserverService->AddObserver(this, "net:prune-all-connections", true);
          mObserverService->AddObserver(this, "net:prune-dead-connections", true);
-+        mObserverService->AddObserver(this, "net:prune-all-connections", PR_TRUE);
+         mObserverService->AddObserver(this, "net:failed-to-process-uri-content", true);
      }
-  
-     return NS_OK;
-@@ -1587,6 +1588,12 @@ nsHttpHandler::Observe(nsISupports *subject,
-             mConnMgr->PruneDeadConnections();
-         }
+@@ -1665,6 +1666,12 @@ nsHttpHandler::Observe(nsISupports *subject,
+         if (uri && mConnMgr)
+             mConnMgr->ReportFailedToProcess(uri);
      }
 +    else if (strcmp(topic, "net:prune-all-connections") == 0) {
 +        if (mConnMgr) {
diff --git a/src/current-patches/firefox/alpha/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch b/src/current-patches/firefox/alpha/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch
index 06e3e81..f92cc80 100644
--- a/src/current-patches/firefox/alpha/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch
+++ b/src/current-patches/firefox/alpha/0009-Limit-device-and-system-specific-CSS-Media-Queries.patch
@@ -1,7 +1,7 @@
-From 6c09a21d1db29dc28b359294ededc047ba5b463e Mon Sep 17 00:00:00 2001
+From c4fbcc6ea2af3d7a97e0ab7687aa8921a02f243f Mon Sep 17 00:00:00 2001
 From: Shondoit Walker <shondoit at gmail.com>
 Date: Mon, 4 Jun 2012 19:15:31 +0200
-Subject: [PATCH 09/20] Limit device- and system-specific CSS Media Queries
+Subject: [PATCH 09/19] Limit device- and system-specific CSS Media Queries
 
 This is done to address
 https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability
diff --git a/src/current-patches/firefox/alpha/0010-Rebrand-Firefox-to-TorBrowser.patch b/src/current-patches/firefox/alpha/0010-Rebrand-Firefox-to-TorBrowser.patch
index baffded..b55d18d 100644
--- a/src/current-patches/firefox/alpha/0010-Rebrand-Firefox-to-TorBrowser.patch
+++ b/src/current-patches/firefox/alpha/0010-Rebrand-Firefox-to-TorBrowser.patch
@@ -1,7 +1,7 @@
-From 622437f3baf410f14610b21bcca7f9a0fcc8c6d9 Mon Sep 17 00:00:00 2001
+From 60d3c7f15f7be3a49b3f0301146c46a1c640d24a Mon Sep 17 00:00:00 2001
 From: Erinn Clark <erinn at torproject.org>
 Date: Wed, 25 Apr 2012 09:14:00 -0300
-Subject: [PATCH 10/20] Rebrand Firefox to TorBrowser
+Subject: [PATCH 10/19] 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/src/current-patches/firefox/alpha/0011-Make-Download-manager-memory-only.patch b/src/current-patches/firefox/alpha/0011-Make-Download-manager-memory-only.patch
index 67d4817..e8680ba 100644
--- a/src/current-patches/firefox/alpha/0011-Make-Download-manager-memory-only.patch
+++ b/src/current-patches/firefox/alpha/0011-Make-Download-manager-memory-only.patch
@@ -1,7 +1,7 @@
-From 8992ae1cb7e1545413e649027ab7827799c53300 Mon Sep 17 00:00:00 2001
+From d4810f02097dd7a3cf2ba597ca9c0e0358bb74ad Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Wed, 25 Apr 2012 13:39:35 -0700
-Subject: [PATCH 11/20] Make Download manager memory only.
+Subject: [PATCH 11/19] 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 cb1f1f6..1de653b 100644
+index 1cdc022..71d89a1 100644
 --- a/toolkit/components/downloads/nsDownloadManager.cpp
 +++ b/toolkit/components/downloads/nsDownloadManager.cpp
-@@ -1999,7 +1999,7 @@ nsDownloadManager::Observe(nsISupports *aSubject,
+@@ -2037,7 +2037,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 cb1f1f6..1de653b 100644
    }
    else if (strcmp(aTopic, "alertclickcallback") == 0) {
      nsCOMPtr<nsIDownloadManagerUI> dmui =
-@@ -2076,7 +2076,7 @@ nsDownloadManager::OnLeavePrivateBrowsingMode()
+@@ -2114,7 +2114,7 @@ nsDownloadManager::OnLeavePrivateBrowsingMode()
    (void)ResumeAllDownloads(false);
  
    // Switch back to the on-disk DB again
@@ -40,7 +40,7 @@ index cb1f1f6..1de653b 100644
    mInPrivateBrowsing = false;
  }
 diff --git a/toolkit/components/downloads/nsDownloadManager.h b/toolkit/components/downloads/nsDownloadManager.h
-index 16a861e..e729cbf 100644
+index f3df6f7..7946973 100644
 --- a/toolkit/components/downloads/nsDownloadManager.h
 +++ b/toolkit/components/downloads/nsDownloadManager.h
 @@ -92,7 +92,7 @@ public:
diff --git a/src/current-patches/firefox/alpha/0012-Add-DDG-and-StartPage-to-Omnibox.patch b/src/current-patches/firefox/alpha/0012-Add-DDG-and-StartPage-to-Omnibox.patch
index 9452b8b..890c6fc 100644
--- a/src/current-patches/firefox/alpha/0012-Add-DDG-and-StartPage-to-Omnibox.patch
+++ b/src/current-patches/firefox/alpha/0012-Add-DDG-and-StartPage-to-Omnibox.patch
@@ -1,7 +1,7 @@
-From 59b8b663b93248db34ad741ccb9972ecb6814c1f Mon Sep 17 00:00:00 2001
+From 3bb5867bd77a042b867d890e72c8dfbc236de1a8 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Wed, 25 Apr 2012 15:03:46 -0700
-Subject: [PATCH 12/20] Add DDG and StartPage to Omnibox.
+Subject: [PATCH 12/19] 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/src/current-patches/firefox/alpha/0013-Make-nsICacheService.EvictEntries-synchronous.patch b/src/current-patches/firefox/alpha/0013-Make-nsICacheService.EvictEntries-synchronous.patch
index 0514fb8..6ae486c 100644
--- a/src/current-patches/firefox/alpha/0013-Make-nsICacheService.EvictEntries-synchronous.patch
+++ b/src/current-patches/firefox/alpha/0013-Make-nsICacheService.EvictEntries-synchronous.patch
@@ -1,7 +1,7 @@
-From 3b6137594c9f25725b3dd0fd46cfc8c86d6a772e Mon Sep 17 00:00:00 2001
+From 94a5a512ea1a66ea1c1a9a3b57c25b13ae19aea6 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Tue, 1 May 2012 15:02:03 -0700
-Subject: [PATCH 13/20] Make nsICacheService.EvictEntries synchronous
+Subject: [PATCH 13/19] 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 8c85b68..d43f121 100644
+index 801507e..c37bd7c 100644
 --- a/netwerk/cache/nsCacheService.cpp
 +++ b/netwerk/cache/nsCacheService.cpp
-@@ -1414,10 +1414,21 @@ NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor)
+@@ -1530,10 +1530,21 @@ NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor)
      return NS_OK;
  }
  
diff --git a/src/current-patches/firefox/alpha/0014-Prevent-WebSocket-DNS-leak.patch b/src/current-patches/firefox/alpha/0014-Prevent-WebSocket-DNS-leak.patch
index e95b223..f085502 100644
--- a/src/current-patches/firefox/alpha/0014-Prevent-WebSocket-DNS-leak.patch
+++ b/src/current-patches/firefox/alpha/0014-Prevent-WebSocket-DNS-leak.patch
@@ -1,7 +1,7 @@
-From 0607517f87c2a0060f4f1e437f0ac37a889047a9 Mon Sep 17 00:00:00 2001
+From 5c680fadbae54ff9f0d1817823679cd961049ceb Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Wed, 2 May 2012 17:44:39 -0700
-Subject: [PATCH 14/20] Prevent WebSocket DNS leak.
+Subject: [PATCH 14/19] Prevent WebSocket DNS leak.
 
 This is due to an improper implementation of the WebSocket spec by Mozilla.
 
@@ -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 3578866..b1aaec2 100644
+index 7a5ee7b..7f68798 100644
 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp
 +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
-@@ -1884,8 +1884,12 @@ WebSocketChannel::ApplyForAdmission()
+@@ -1897,8 +1897,12 @@ WebSocketChannel::ApplyForAdmission()
    LOG(("WebSocketChannel::ApplyForAdmission: checking for concurrent open\n"));
    nsCOMPtr<nsIThread> mainThread;
    NS_GetMainThread(getter_AddRefs(mainThread));
diff --git a/src/current-patches/firefox/alpha/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch b/src/current-patches/firefox/alpha/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch
index 8d0aee3..472bab2 100644
--- a/src/current-patches/firefox/alpha/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch
+++ b/src/current-patches/firefox/alpha/0015-Make-Tor-Browser-exit-when-not-launched-from-Vidalia.patch
@@ -1,7 +1,7 @@
-From c482a4bd10c58099f7bab0c5990c6e5a29b6c59d Mon Sep 17 00:00:00 2001
+From 6c15c52f930e7c7bccca0270219d87433c6d4dc8 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Thu, 7 Jun 2012 14:45:26 -0700
-Subject: [PATCH 15/20] Make Tor Browser exit when not launched from Vidalia
+Subject: [PATCH 15/19] 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
@@ -16,10 +16,10 @@ actually be common.
  1 files changed, 14 insertions(+), 0 deletions(-)
 
 diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
-index 6e254ca..57ca373 100644
+index fa89e20..e504b88 100644
 --- a/browser/base/content/browser.js
 +++ b/browser/base/content/browser.js
-@@ -1234,6 +1234,20 @@ function BrowserStartup() {
+@@ -1243,6 +1243,20 @@ function BrowserStartup() {
  
    prepareForStartup();
  
diff --git a/src/current-patches/firefox/alpha/0016-Limit-the-number-of-fonts-per-document.patch b/src/current-patches/firefox/alpha/0016-Limit-the-number-of-fonts-per-document.patch
index dcb5f52..295a832 100644
--- a/src/current-patches/firefox/alpha/0016-Limit-the-number-of-fonts-per-document.patch
+++ b/src/current-patches/firefox/alpha/0016-Limit-the-number-of-fonts-per-document.patch
@@ -1,7 +1,7 @@
-From 649b237e95315e9858cfb038f9f7f95199584cbd Mon Sep 17 00:00:00 2001
+From 56f0543f8bc32d5f22b84d6bd4f59a0f93ef815a Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
 Date: Thu, 7 Jun 2012 15:09:59 -0700
-Subject: [PATCH 16/20] Limit the number of fonts per document.
+Subject: [PATCH 16/19] Limit the number of fonts per document.
 
 We create two prefs:
 browser.display.max_font_count and browser.display.max_font_attempts.
@@ -23,7 +23,7 @@ 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 f3815fb..1ab210e 100644
+index 5c8b974..c567111 100644
 --- a/layout/base/nsPresContext.cpp
 +++ b/layout/base/nsPresContext.cpp
 @@ -97,6 +97,8 @@
@@ -35,7 +35,7 @@ index f3815fb..1ab210e 100644
  
  #ifdef IBMBIDI
  #include "nsBidiPresUtils.h"
-@@ -772,6 +774,10 @@ nsPresContext::GetUserPreferences()
+@@ -774,6 +776,10 @@ nsPresContext::GetUserPreferences()
    // * use fonts?
    mUseDocumentFonts =
      Preferences::GetInt("browser.display.use_document_fonts") != 0;
@@ -46,7 +46,7 @@ index f3815fb..1ab210e 100644
  
    // * replace backslashes with Yen signs? (bug 245770)
    mEnableJapaneseTransform =
-@@ -1381,6 +1387,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID, nsIAtom *aLanguage) const
+@@ -1383,6 +1389,100 @@ nsPresContext::GetDefaultFont(PRUint8 aFontID, nsIAtom *aLanguage) const
    return font;
  }
  
@@ -148,7 +148,7 @@ index f3815fb..1ab210e 100644
  nsPresContext::SetFullZoom(float aZoom)
  {
 diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h
-index e367c5f..3d979f1 100644
+index 9d58bcf..08b7766 100644
 --- a/layout/base/nsPresContext.h
 +++ b/layout/base/nsPresContext.h
 @@ -535,6 +535,13 @@ public:
@@ -165,7 +165,7 @@ index e367c5f..3d979f1 100644
    /**
     * 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:
+@@ -1195,6 +1202,8 @@ protected:
    PRUint32              mInterruptChecksToSkip;
  
    mozilla::TimeStamp    mReflowStartTime;
@@ -175,7 +175,7 @@ index e367c5f..3d979f1 100644
    unsigned              mHasPendingInterrupt : 1;
    unsigned              mInterruptsEnabled : 1;
 diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
-index 4b134b2..82b1dd7 100644
+index 294a41c..c9313bc 100644
 --- a/layout/style/nsRuleNode.cpp
 +++ b/layout/style/nsRuleNode.cpp
 @@ -3102,14 +3102,15 @@ nsRuleNode::ComputeFontData(void* aStartStruct,
diff --git a/src/current-patches/firefox/alpha/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch b/src/current-patches/firefox/alpha/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch
index 6ea29eb..407296e 100644
--- a/src/current-patches/firefox/alpha/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch
+++ b/src/current-patches/firefox/alpha/0017-Randomize-HTTP-request-order-and-pipeline-depth.patch
@@ -1,7 +1,7 @@
-From 09c27d0aee130959ee1aae211e9400600c26ade6 Mon Sep 17 00:00:00 2001
+From 54b2fce6f6dc202de87414d828ef5328f368f1f3 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
-Date: Thu, 7 Jun 2012 15:13:45 -0700
-Subject: [PATCH 17/20] Randomize HTTP request order and pipeline depth.
+Date: Fri, 20 Jul 2012 18:13:44 -0700
+Subject: [PATCH 17/19] Randomize HTTP request order and pipeline depth.
 
 This is an experimental defense against
 http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf
@@ -11,16 +11,74 @@ https://blog.torproject.org/blog/experimental-defense-website-traffic-fingerprin
 
 This defense has been improved since that blog post to additionally randomize
 the order and concurrency of non-pipelined HTTP requests.
+
+This patch is also different from the 10.x ESR patch, as the pipelining
+code has changed. We may want to set network.http.pipelining.aggressive to get
+similar behavior...
+
+The good news is we now randomize SPDY request order as well as pipeline
+request order (though SPDY is still disabled by default in TBB).
 ---
- netwerk/protocol/http/nsHttpConnectionMgr.cpp |  136 ++++++++++++++++++++++++-
- netwerk/protocol/http/nsHttpConnectionMgr.h   |    5 +
- 2 files changed, 136 insertions(+), 5 deletions(-)
+ netwerk/protocol/http/nsHttpConnectionMgr.cpp |   54 +++++++++++++++++++++++--
+ netwerk/protocol/http/nsHttpConnectionMgr.h   |    3 +
+ 2 files changed, 53 insertions(+), 4 deletions(-)
 
 diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
-index 463584f..e05669c 100644
+index 5336c7d..b20e770 100644
 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
 +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
-@@ -101,6 +101,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr()
+@@ -52,6 +52,8 @@
+ #include "prnetdb.h"
+ #include "mozilla/Telemetry.h"
+ 
++#include <stdlib.h>
++
+ using namespace mozilla;
+ 
+ // defined by the socket transport service while active
+@@ -70,15 +72,37 @@ InsertTransactionSorted(nsTArray<nsHttpTransaction*> &pendingQ, nsHttpTransactio
+     // insert into queue with smallest valued number first.  search in reverse
+     // order under the assumption that many of the existing transactions will
+     // have the same priority (usually 0).
++    PRInt32 begin = 0, end = -1;
++
++    if (pendingQ.IsEmpty()) {
++         pendingQ.InsertElementAt(0, trans);
++         return;
++    }
+ 
+     for (PRInt32 i=pendingQ.Length()-1; i>=0; --i) {
+         nsHttpTransaction *t = pendingQ[i];
+-        if (trans->Priority() >= t->Priority()) {
+-            pendingQ.InsertElementAt(i+1, trans);
+-            return;
++        if (end == -1 && trans->Priority() >= t->Priority()) {
++            end = i+1;
++        } else if (trans->Priority() < t->Priority()) {
++            begin = i+1;
++            break;
+         }
+     }
+-    pendingQ.InsertElementAt(0, trans);
++
++    if (end == -1) {
++         pendingQ.AppendElement(trans);
++         return;
++    }
++
++    // Choose random destination begin..end
++    PRInt32 count = 1+end - begin;
++
++    // FIXME: rand() is not crypto-secure.. but meh, this code will probably
++    // change like 2 dozen more times before merge, and rand() is probably 
++    // good enough for our purposes anyways.
++    pendingQ.InsertElementAt(begin + (rand()%count), trans);
++
++    // XXX Verify length, ordering inside a DEBUG ifdef??
+ }
+ 
+ //-----------------------------------------------------------------------------
+@@ -101,6 +125,12 @@ nsHttpConnectionMgr::nsHttpConnectionMgr()
      mCT.Init();
      mAlternateProtocolHash.Init(16);
      mSpdyPreferredHash.Init();
@@ -33,66 +91,14 @@ index 463584f..e05669c 100644
  }
  
  nsHttpConnectionMgr::~nsHttpConnectionMgr()
-@@ -380,8 +386,12 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline)
-         nsConnectionEntry *ent = mCT.Get(ci->HashKey());
-         if (ent) {
-             // search for another request to pipeline...
--            PRInt32 i, count = ent->mPendingQ.Length();
--            for (i=0; i<count; ++i) {
-+            PRInt32 i, h, count = ent->mPendingQ.Length();
-+            PRInt32* ind = new PRInt32[count];
-+            ShuffleRequestOrder((PRUint32*)ind, (PRUint32)count);
-+       
-+            for (h=0; h<count; ++h) {
-+                i = ind[h]; // random request sequence
-                 nsHttpTransaction *trans = ent->mPendingQ[i];
-                 if (trans->Caps() & NS_HTTP_ALLOW_PIPELINING) {
-                     pipeline->AddTransaction(trans);
-@@ -392,6 +402,8 @@ nsHttpConnectionMgr::AddTransactionToPipeline(nsHttpPipeline *pipeline)
-                     break;
-                 }
-             }
-+
-+            delete [] ind;
-         }
-     }
- }
-@@ -922,12 +934,17 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
- 
-     ProcessSpdyPendingQ(ent);
- 
--    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) {
-+
-+        PRUint32* ind = new PRUint32[count];
-+        ShuffleRequestOrder(ind, count);
-+       
-+        for (h=0; h<count; ++h) {
-+            i = ind[h]; // random request sequence
-             trans = ent->mPendingQ[i];
- 
-             // When this transaction has already established a half-open
-@@ -951,6 +968,7 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
-                               "something mutated pending queue from "
-                               "GetConnection()");
-         }
-+        delete [] ind;
-         if (conn) {
-             LOG(("  dispatching pending transaction...\n"));
- 
-@@ -1035,6 +1053,19 @@ nsHttpConnectionMgr::AtActiveConnectionLimit(nsConnectionEntry *ent, PRUint8 cap
+@@ -1115,6 +1145,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 on a the high side of concurrent connections
++    // end up converging on the high side of concurrent connections
 +    // after a short while. 
 +    PRUint8 *bytes = nsnull;
 +    nsresult rv = mRandomGenerator->GenerateRandomBytes(1, &bytes);
@@ -103,124 +109,23 @@ index 463584f..e05669c 100644
 +    NS_Free(bytes);
 +
      // use >= just to be safe
-     return (totalCount >= maxConns) || ( (caps & NS_HTTP_ALLOW_KEEPALIVE) &&
-                                          (persistCount >= maxPersistConns) );
-@@ -1274,7 +1305,7 @@ nsHttpConnectionMgr::DispatchTransaction(nsConnectionEntry *ent,
+     bool result = (totalCount >= maxConns) || ( (caps & NS_HTTP_ALLOW_KEEPALIVE) &&
+                                               (persistCount >= maxPersistConns) );
+@@ -1250,6 +1293,9 @@ nsHttpConnectionMgr::AddToShortestPipeline(nsConnectionEntry *ent,
  
-     if (conn->SupportsPipelining() && (caps & NS_HTTP_ALLOW_PIPELINING)) {
-         LOG(("  looking to build pipeline...\n"));
--        if (BuildPipeline(ent, trans, &pipeline))
-+        if (BuildRandomizedPipeline(ent, trans, &pipeline))
-             trans = pipeline;
-     }
+     maxdepth = PR_MIN(maxdepth, depthLimit);
  
-@@ -1349,6 +1380,101 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent,
-     return true;
- }
- 
-+
-+// Generate a shuffled request ordering sequence 
-+void
-+nsHttpConnectionMgr::ShuffleRequestOrder(PRUint32 *ind, PRUint32 count)
-+{
-+   PRUint32 i;
-+   PRUint32 *rints;
-+
-+   for (i=0; i<count; ++i) {
-+       ind[i] = i;
-+   }
-+   nsresult rv = mRandomGenerator->GenerateRandomBytes(sizeof(PRUint32)*count,
-+                                                       (PRUint8**)&rints);
-+   if (NS_FAILED(rv))
-+       return; // Leave unshuffled if error
-+
-+   for (i=0; i < count; ++i) {
-+       PRInt32 temp = ind[i];
-+       ind[i] = ind[rints[i]%count]; 
-+       ind[rints[i]%count] = temp;
-+   }
-+   NS_Free(rints);
-+}
-+
-+bool
-+nsHttpConnectionMgr::BuildRandomizedPipeline(nsConnectionEntry *ent,
-+                                   nsAHttpTransaction *firstTrans,
-+                                   nsHttpPipeline **result)
-+{
-+    if (mRandomGenerator == nsnull)
-+        return BuildPipeline(ent, firstTrans, result);
-+    if (mMaxPipelinedRequests < 2)
-+        return PR_FALSE;
-+
-+    nsresult rv;
-+    PRUint8 *bytes = nsnull;
-+
-+    nsHttpPipeline *pipeline = nsnull;
-+    nsHttpTransaction *trans;
-+
-+    PRUint32 i = 0, numAdded = 0, numAllowed = 0;
-+    PRUint32 max = 0;
-+
-+    while (i < ent->mPendingQ.Length()) {
-+        if (ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING)
-+            numAllowed++;
-+        i++;
-+    }
-+
-+    rv = mRandomGenerator->GenerateRandomBytes(1, &bytes);
-+    NS_ENSURE_SUCCESS(rv, rv);
-+    // 4...12
-+    max = 4 + (bytes[0] % (mMaxPipelinedRequests + 1));
-+    NS_Free(bytes);
-+
-+    while (numAllowed > 0) {
-+        rv = mRandomGenerator->GenerateRandomBytes(1, &bytes);
-+        NS_ENSURE_SUCCESS(rv, rv);
-+        i = bytes[0] % ent->mPendingQ.Length();
-+        NS_Free(bytes);
-+
-+        trans = ent->mPendingQ[i];
-+
-+        if (!(ent->mPendingQ[i]->Caps() & NS_HTTP_ALLOW_PIPELINING))
-+            continue;
-+
-+        if (numAdded == 0) {
-+            pipeline = new nsHttpPipeline;
-+            if (!pipeline)
-+                return PR_FALSE;
-+            pipeline->AddTransaction(firstTrans);
-+            numAdded = 1;
-+        }
-+        pipeline->AddTransaction(trans);
-+
-+        // remove transaction from pending queue
-+        ent->mPendingQ.RemoveElementAt(i);
-+        NS_RELEASE(trans);
-+
-+        numAllowed--;
++    // This is a crazy hack to randomize pipeline depth a bit more..
++    maxdepth = 1 + maxdepth/2 + (rand() % (maxdepth/2));
 +
-+        if (++numAdded == max)
-+            break;
-+    }
-+
-+    //fprintf(stderr, "Yay!!! pipelined %u/%u transactions\n", numAdded, max);
-+    LOG(("  pipelined %u/%u transactions\n", numAdded, max));
-+
-+    if (numAdded == 0)
-+        return PR_FALSE;
-+
-+    NS_ADDREF(*result = pipeline);
-+    return PR_TRUE;
-+}
-+
- nsresult
- nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans)
- {
+     if (maxdepth < 2)
+         return false;
+ 
 diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h
-index 6b4398b..c33870f 100644
+index 9f36345..6e12015 100644
 --- a/netwerk/protocol/http/nsHttpConnectionMgr.h
 +++ b/netwerk/protocol/http/nsHttpConnectionMgr.h
-@@ -53,6 +53,7 @@
+@@ -54,6 +54,7 @@
  #include "nsIObserver.h"
  #include "nsITimer.h"
  #include "nsIX509Cert3.h"
@@ -228,16 +133,7 @@ index 6b4398b..c33870f 100644
  
  class nsHttpPipeline;
  
-@@ -320,6 +321,8 @@ private:
-     nsresult DispatchTransaction(nsConnectionEntry *, nsHttpTransaction *,
-                                  PRUint8 caps, nsHttpConnection *);
-     bool     BuildPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **);
-+    bool     BuildRandomizedPipeline(nsConnectionEntry *, nsAHttpTransaction *, nsHttpPipeline **);
-+    void     ShuffleRequestOrder(PRUint32 *, PRUint32);
-     nsresult ProcessNewTransaction(nsHttpTransaction *);
-     nsresult EnsureSocketThreadTargetIfOnline();
-     void     ClosePersistentConnections(nsConnectionEntry *ent);
-@@ -412,6 +415,8 @@ private:
+@@ -562,6 +563,8 @@ private:
      PRUint64 mTimeOfNextWakeUp;
      // Timer for next pruning of dead connections.
      nsCOMPtr<nsITimer> mTimer;
diff --git a/src/current-patches/firefox/alpha/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch b/src/current-patches/firefox/alpha/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch
index b4ff898..0ef12a9 100644
--- a/src/current-patches/firefox/alpha/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch
+++ b/src/current-patches/firefox/alpha/0018-Adapt-Steven-Michaud-s-Mac-crashfix-patch.patch
@@ -1,7 +1,7 @@
-From 7c321c4d75c7c80d899db962804d288ed7db162e Mon Sep 17 00:00:00 2001
+From 0beb4d8440fd7ff415ac3207d010947c9bfceaf2 Mon Sep 17 00:00:00 2001
 From: Mike Perry <mikeperry-git at torproject.org>
-Date: Thu, 7 Jun 2012 15:26:13 -0700
-Subject: [PATCH 18/20] Adapt Steven Michaud's Mac crashfix patch
+Date: Fri, 20 Jul 2012 18:29:08 -0700
+Subject: [PATCH 18/19] Adapt Steven Michaud's Mac crashfix patch
 
 Source is: https://bugzilla.mozilla.org/show_bug.cgi?id=715885#c35
 
@@ -10,8 +10,8 @@ MacOS.
 ---
  widget/Makefile.in                        |    1 +
  widget/cocoa/nsChildView.mm               |   28 +++++++++++------
- widget/gtk2/nsDragService.cpp             |    2 +-
- widget/gtk2/nsWindow.cpp                  |    2 +-
+ widget/gtk2/nsDragService.cpp             |    4 +-
+ widget/gtk2/nsWindow.cpp                  |    3 +-
  widget/nsIDragService.idl                 |    4 +--
  widget/nsPIDragService.idl                |   48 +++++++++++++++++++++++++++++
  widget/qt/nsDragService.h                 |    2 +
@@ -23,7 +23,7 @@ MacOS.
  widget/windows/nsPIDragServiceWindows.idl |   46 +++++++++++++++++++++++++++
  widget/xpwidgets/nsBaseDragService.cpp    |   16 +++++++++-
  widget/xpwidgets/nsBaseDragService.h      |    9 ++---
- 15 files changed, 176 insertions(+), 46 deletions(-)
+ 15 files changed, 178 insertions(+), 47 deletions(-)
  create mode 100644 widget/nsPIDragService.idl
  create mode 100644 widget/windows/nsPIDragServiceWindows.idl
 
@@ -40,7 +40,7 @@ index 4a3405b..4c105a4 100644
  		nsIFormatConverter.idl \
  		nsIClipboard.idl \
 diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm
-index 0db6b1c..8d59716 100644
+index 6f89719..33c16ff 100644
 --- a/widget/cocoa/nsChildView.mm
 +++ b/widget/cocoa/nsChildView.mm
 @@ -4555,11 +4555,12 @@ NSEvent* gLastDragMouseDownEvent = nil;
@@ -97,31 +97,42 @@ index 0db6b1c..8d59716 100644
  
      mDragService->EndDragSession(true);
 diff --git a/widget/gtk2/nsDragService.cpp b/widget/gtk2/nsDragService.cpp
-index be8f388..99d3878 100644
+index 16f9764..0f078b6 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);
+@@ -285,7 +285,7 @@ OnSourceGrabEventAfter(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+     // the NS_DRAGDROP_END event.
+     nsDragService *dragService = static_cast<nsDragService*>(user_data);
+     dragService->
+-        SetDragEndPoint(nsIntPoint(event->motion.x_root, event->motion.y_root));
++        SetDragEndPoint(event->motion.x_root, event->motion.y_root);
+ 
+     MotionEventData *data = new MotionEventData(widget, event);
+ 
+@@ -1404,7 +1404,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
+index 07a1ae2..664293d 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);
+@@ -3447,8 +3447,9 @@ nsWindow::OnDragDropEvent(GtkWidget *aWidget,
+     // get our drag context
+     nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID);
+     nsDragService *dragServiceGTK = static_cast<nsDragService*>(dragService.get());
++    nsIntPoint end = nsIntPoint(aX, aY) + WidgetToScreenOffset();
+ 
+-    dragServiceGTK->SetDragEndPoint(nsIntPoint(aX, aY) + WidgetToScreenOffset());
++    dragServiceGTK->SetDragEndPoint(end.x, end.y);
  
+     nscoord retx = 0;
+     nscoord rety = 0;
 diff --git a/widget/nsIDragService.idl b/widget/nsIDragService.idl
 index e42c578..ef8c46f 100644
 --- a/widget/nsIDragService.idl
@@ -227,7 +238,7 @@ index df811ac..8d5ea4b 100644
    ../xpwidgets/$(LIB_PREFIX)xpwidgets_s.$(LIB_SUFFIX) \
    $(NULL)
 diff --git a/widget/windows/nsDragService.cpp b/widget/windows/nsDragService.cpp
-index b6b5b62..9657263 100644
+index ec4b16e..bbae112 100644
 --- a/widget/windows/nsDragService.cpp
 +++ b/widget/windows/nsDragService.cpp
 @@ -97,6 +97,8 @@ nsDragService::~nsDragService()
diff --git a/src/current-patches/firefox/alpha/0019-Fix-Firefox-13-build-process.patch b/src/current-patches/firefox/alpha/0019-Fix-Firefox-13-build-process.patch
deleted file mode 100644
index 4ac5d0a..0000000
--- a/src/current-patches/firefox/alpha/0019-Fix-Firefox-13-build-process.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 41f44964edbee300c098d110be3f029ebb711081 Mon Sep 17 00:00:00 2001
-From: Mike Perry <mikeperry-git at 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/src/current-patches/firefox/alpha/0019-Fix-Firefox-build-process.patch b/src/current-patches/firefox/alpha/0019-Fix-Firefox-build-process.patch
new file mode 100644
index 0000000..5415a03
--- /dev/null
+++ b/src/current-patches/firefox/alpha/0019-Fix-Firefox-build-process.patch
@@ -0,0 +1,267 @@
+From dc89146d7f45dc1b0d0050d1714118b4968a8339 Mon Sep 17 00:00:00 2001
+From: Mike Perry <mikeperry-git at torproject.org>
+Date: Mon, 23 Jul 2012 15:01:01 -0700
+Subject: [PATCH 19/19] Fix Firefox build process.
+
+Patch is from https://bugzilla.mozilla.org/show_bug.cgi?id=736961 and
+https://bugzilla.mozilla.org/show_bug.cgi?id=754625.
+---
+ config/rules.mk                           |   12 ++++-----
+ js/src/config/rules.mk                    |   12 ++++-----
+ js/xpconnect/src/Makefile.in              |   35 ++++++++++++----------------
+ js/xpconnect/src/dictionary_helper_gen.py |    2 +-
+ toolkit/mozapps/installer/packager.mk     |    2 +
+ xpcom/idl-parser/Makefile.in              |    7 ++---
+ xpcom/idl-parser/header.py                |    7 ++---
+ 7 files changed, 34 insertions(+), 43 deletions(-)
+
+diff --git a/config/rules.mk b/config/rules.mk
+index c522235..653ac9e 100644
+--- a/config/rules.mk
++++ b/config/rules.mk
+@@ -1437,9 +1437,9 @@ endif
+ # warn against overriding existing .h file.
+ 
+ XPIDL_DEPS = \
+-  $(topsrcdir)/xpcom/idl-parser/header.py \
+-  $(topsrcdir)/xpcom/idl-parser/typelib.py \
+-  $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++  $(LIBXUL_DIST)/sdk/bin/header.py \
++  $(LIBXUL_DIST)/sdk/bin/typelib.py \
++  $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+   $(NULL)
+ 
+ xpidl-preqs = \
+@@ -1451,8 +1451,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
+ 	$(REPORT_BUILD)
+ 	$(PYTHON_PATH) \
+ 	  $(PLY_INCLUDE) \
+-	  -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 $@
++	  $(LIBXUL_DIST)/sdk/bin/header.py $(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
+ 
+@@ -1463,9 +1462,8 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
+ 	$(REPORT_BUILD)
+ 	$(PYTHON_PATH) \
+ 	  $(PLY_INCLUDE) \
+-	  -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 $@
++	  $(LIBXUL_DIST)/sdk/bin/typelib.py $(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 c522235..653ac9e 100644
+--- a/js/src/config/rules.mk
++++ b/js/src/config/rules.mk
+@@ -1437,9 +1437,9 @@ endif
+ # warn against overriding existing .h file.
+ 
+ XPIDL_DEPS = \
+-  $(topsrcdir)/xpcom/idl-parser/header.py \
+-  $(topsrcdir)/xpcom/idl-parser/typelib.py \
+-  $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++  $(LIBXUL_DIST)/sdk/bin/header.py \
++  $(LIBXUL_DIST)/sdk/bin/typelib.py \
++  $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+   $(NULL)
+ 
+ xpidl-preqs = \
+@@ -1451,8 +1451,7 @@ $(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
+ 	$(REPORT_BUILD)
+ 	$(PYTHON_PATH) \
+ 	  $(PLY_INCLUDE) \
+-	  -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 $@
++	  $(LIBXUL_DIST)/sdk/bin/header.py $(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
+ 
+@@ -1463,9 +1462,8 @@ $(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_DEPS) $(xpidl-preqs)
+ 	$(REPORT_BUILD)
+ 	$(PYTHON_PATH) \
+ 	  $(PLY_INCLUDE) \
+-	  -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 $@
++	  $(LIBXUL_DIST)/sdk/bin/typelib.py $(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 35dfa68..0587acf 100644
+--- a/js/xpconnect/src/Makefile.in
++++ b/js/xpconnect/src/Makefile.in
+@@ -147,15 +147,14 @@ dom_quickstubs.h: dom_quickstubs.cpp
+ 
+ dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
+                     $(srcdir)/qsgen.py \
+-                    $(topsrcdir)/xpcom/idl-parser/header.py \
+-                    $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++                    $(LIBXUL_DIST)/sdk/bin/header.py \
++                    $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+                     $(DEPTH)/js/src/js-confdefs.h
+ 	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
++	  -I$(LIBXUL_DIST)/sdk/bin \
+ 	  $(srcdir)/qsgen.py \
+ 	  --idlpath=$(DEPTH)/dist/idl \
+-	  --cachedir=$(DEPTH)/xpcom/idl-parser \
+ 	  --header-output dom_quickstubs.h \
+ 	  --stub-output dom_quickstubs.cpp \
+ 	  --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
+@@ -168,15 +167,14 @@ dombindings.$(OBJ_SUFFIX): dombindings_gen.h \
+ dombindings_gen.h: $(srcdir)/dombindings.conf \
+                    $(srcdir)/dombindingsgen.py \
+                    $(srcdir)/codegen.py \
+-                   $(topsrcdir)/xpcom/idl-parser/header.py \
+-                   $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++                   $(LIBXUL_DIST)/sdk/bin/header.py \
++                   $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+                    $(DEPTH)/js/src/js-confdefs.h
+ 	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
++	  -I$(LIBXUL_DIST)/sdk/bin \
+ 	  $(srcdir)/dombindingsgen.py \
+ 	  --idlpath=$(DEPTH)/dist/idl \
+-	  --cachedir=$(DEPTH)/xpcom/idl-parser \
+ 	  --header-output dombindings_gen.h \
+ 	  $(srcdir)/dombindings.conf
+ 
+@@ -185,15 +183,14 @@ exports:: dombindings_gen.h
+ dombindings_gen.cpp: $(srcdir)/dombindings.conf \
+                      $(srcdir)/dombindingsgen.py \
+                      $(srcdir)/codegen.py \
+-                     $(topsrcdir)/xpcom/idl-parser/header.py \
+-                     $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++                     $(LIBXUL_DIST)/sdk/bin/header.py \
++                     $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+                      $(DEPTH)/js/src/js-confdefs.h
+ 	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
++	  -I$(LIBXUL_DIST)/sdk/bin \
+ 	  $(srcdir)/dombindingsgen.py \
+ 	  --idlpath=$(DEPTH)/dist/idl \
+-	  --cachedir=$(DEPTH)/xpcom/idl-parser \
+ 	  --stub-output dombindings_gen.cpp \
+ 	  --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \
+ 	  $(srcdir)/dombindings.conf
+@@ -204,30 +201,28 @@ DictionaryHelpers.$(OBJ_SUFFIX): DictionaryHelpers.h \
+ DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.conf \
+                      $(srcdir)/dictionary_helper_gen.py \
+                      $(srcdir)/codegen.py \
+-                     $(topsrcdir)/xpcom/idl-parser/header.py \
+-                     $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++                     $(LIBXUL_DIST)/sdk/bin/header.py \
++                     $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+                      $(DEPTH)/js/src/js-confdefs.h
+ 	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
++	  -I$(LIBXUL_DIST)/sdk/bin \
+ 	  $(srcdir)/dictionary_helper_gen.py \
+ 	  -I $(DEPTH)/dist/idl \
+-	  --cachedir=$(DEPTH)/xpcom/idl-parser \
+ 	  --header-output DictionaryHelpers.h \
+ 	  $(srcdir)/dictionary_helper_gen.conf
+ 
+ DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \
+                        $(srcdir)/dictionary_helper_gen.py \
+                        $(srcdir)/codegen.py \
+-                       $(topsrcdir)/xpcom/idl-parser/header.py \
+-                       $(topsrcdir)/xpcom/idl-parser/xpidl.py \
++                       $(LIBXUL_DIST)/sdk/bin/header.py \
++                       $(LIBXUL_DIST)/sdk/bin/xpidl.py \
+                        $(DEPTH)/js/src/js-confdefs.h
+ 	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
++	  -I$(LIBXUL_DIST)/sdk/bin \
+ 	  $(srcdir)/dictionary_helper_gen.py \
+ 	  -I $(DEPTH)/dist/idl \
+-	  --cachedir=$(DEPTH)/xpcom/idl-parser \
+ 	  --header-output DictionaryHelpers.h \
+ 	  --stub-output DictionaryHelpers.cpp \
+ 	  --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
+diff --git a/js/xpconnect/src/dictionary_helper_gen.py b/js/xpconnect/src/dictionary_helper_gen.py
+index aaf4da7..5eaa07a 100644
+--- a/js/xpconnect/src/dictionary_helper_gen.py
++++ b/js/xpconnect/src/dictionary_helper_gen.py
+@@ -460,7 +460,7 @@ if __name__ == '__main__':
+                  help="Quick stub header output file", metavar="FILE")
+     o.add_option('--makedepend-output', type='string', default=None,
+                  help="gnumake dependencies output file", metavar="FILE")
+-    o.add_option('--cachedir', dest='cachedir', default='',
++    o.add_option('--cachedir', dest='cachedir', default=None,
+                  help="Directory in which to cache lex/parse tables.")
+     (options, filenames) = o.parse_args()
+     if len(filenames) != 1:
+diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk
+index e217d7f..e7e2b86 100644
+--- a/toolkit/mozapps/installer/packager.mk
++++ b/toolkit/mozapps/installer/packager.mk
+@@ -947,6 +947,7 @@ ifdef INSTALL_SDK # Here comes the hard part
+ 	if test -f $(DIST)/include/xpcom-config.h; then \
+ 	  $(SYSINSTALL) $(IFLAGS1) $(DIST)/include/xpcom-config.h $(DESTDIR)$(sdkdir); \
+ 	fi
++	find $(DIST)/sdk -name "*.pyc" | xargs rm
+ 	(cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/lib && tar -xf -)
+ 	(cd $(DIST)/sdk/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/bin && tar -xf -)
+ 	$(RM) -f $(DESTDIR)$(sdkdir)/lib $(DESTDIR)$(sdkdir)/bin $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/sdk/idl $(DESTDIR)$(sdkdir)/idl
+@@ -967,6 +968,7 @@ make-sdk:
+ 	(cd $(DIST)/host/bin && tar $(TAR_CREATE_FLAGS) - .) | \
+ 	  (cd $(DIST)/$(MOZ_APP_NAME)-sdk/host/bin && tar -xf -)
+ 	$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/sdk
++	find $(DIST)/sdk -name "*.pyc" | xargs rm
+ 	(cd $(DIST)/sdk && tar $(TAR_CREATE_FLAGS) - .) | \
+ 	  (cd $(DIST)/$(MOZ_APP_NAME)-sdk/sdk && tar -xf -)
+ 	$(NSINSTALL) -D $(DIST)/$(MOZ_APP_NAME)-sdk/include
+diff --git a/xpcom/idl-parser/Makefile.in b/xpcom/idl-parser/Makefile.in
+index 4f578a1..e696666 100644
+--- a/xpcom/idl-parser/Makefile.in
++++ b/xpcom/idl-parser/Makefile.in
+@@ -60,14 +60,13 @@ include $(topsrcdir)/config/rules.mk
+ export:: $(PARSER_SRCS) $(PLY_PROGS)
+ 	$(PYTHON_PATH) \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
+-	  $(topsrcdir)/xpcom/idl-parser/header.py --cachedir=. --regen
++	  $(srcdir)/header.py --cachedir=. --regen
+ 
+ check::
+ 	$(PYTHON_PATH) \
+ 	  $(PLY_INCLUDE) \
+-	  -I$(topsrcdir)/xpcom/idl-parser \
+-	  $(topsrcdir)/xpcom/idl-parser/runtests.py
++	  -I. \
++	  $(srcdir)/runtests.py
+ 
+ GARBAGE += \
+   xpidllex.py \
+diff --git a/xpcom/idl-parser/header.py b/xpcom/idl-parser/header.py
+index b8d6940..8ee8765 100644
+--- a/xpcom/idl-parser/header.py
++++ b/xpcom/idl-parser/header.py
+@@ -505,10 +505,9 @@ if __name__ == '__main__':
+             print >>sys.stderr, "--regen useless without --cachedir"
+         # Delete the lex/yacc files.  Ply is too stupid to regenerate them
+         # properly
+-        deadfiles = os.path.join(options.cachedir, "*.py*")
+-        for filename in glob.glob(deadfiles):
+-            print filename
+-            os.remove(filename)
++        for fileglobs in [os.path.join(options.cachedir, f) for f in ["xpidllex.py*", "xpidlyacc.py*"]]:
++            for filename in glob.glob(fileglobs):
++                os.remove(filename)
+ 
+     # Instantiate the parser.
+     p = xpidl.IDLParser(outputdir=options.cachedir)
+-- 
+1.7.5.4
+
diff --git a/src/current-patches/firefox/alpha/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch b/src/current-patches/firefox/alpha/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch
deleted file mode 100644
index d66f79a..0000000
--- a/src/current-patches/firefox/alpha/0020-Fix-internal-compile-error-for-sub-ancient-GCCs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From fb210909f6fd3a4a5253101d44edc8c884bf6c04 Mon Sep 17 00:00:00 2001
-From: Mike Perry <mikeperry-git at 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
-





More information about the tor-commits mailing list