[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbrowser/maint-2.2] Win: Fix the http pipeline patch so it compiles



commit 4a4879a1a95896d96acb0eabedd3f746526ee356
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Fri Apr 27 15:43:56 2012 +0200

    Win: Fix the http pipeline patch so it compiles
---
 ...ize-HTTP-request-order-and-pipeline-depth.patch |   21 ++++++++++++++++++-
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/current-patches/firefox/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch b/src/current-patches/firefox/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch
index 0615abd..684b1e6 100644
--- a/src/current-patches/firefox/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch
+++ b/src/current-patches/firefox/0012-Randomize-HTTP-request-order-and-pipeline-depth.patch
@@ -40,7 +40,7 @@ index 6e1099d..3eec5b3 100644
 -            PRInt32 i, count = ent->mPendingQ.Length();
 -            for (i=0; i<count; ++i) {
 +            PRInt32 i, h, count = ent->mPendingQ.Length();
-+            PRInt32 ind[count];
++            PRInt32* ind = new PRInt32[count];
 +            ShuffleRequestOrder((PRUint32*)ind, (PRUint32)count);
 +       
 +            for (h=0; h<count; ++h) {
@@ -48,6 +48,15 @@ index 6e1099d..3eec5b3 100644
                  nsHttpTransaction *trans = ent->mPendingQ[i];
                  if (trans->Caps() & NS_HTTP_ALLOW_PIPELINING) {
                      pipeline->AddTransaction(trans);
+@@ -365,6 +375,8 @@
+                     break;
+                 }
+             }
++
++            delete [] ind;
+         }
+     }
+ }
 @@ -898,12 +908,17 @@ nsHttpConnectionMgr::ProcessPendingQForEntry(nsConnectionEntry *ent)
  
      ProcessSpdyPendingQ(ent);
@@ -60,7 +69,7 @@ index 6e1099d..3eec5b3 100644
          nsHttpConnection *conn = nsnull;
 -        for (i = 0; i < count; ++i) {
 +
-+        PRUint32 ind[count];
++        PRUInt32* ind = new PRUInt32[count];
 +        ShuffleRequestOrder(ind, count);
 +       
 +        for (h=0; h<count; ++h) {
@@ -68,6 +77,14 @@ index 6e1099d..3eec5b3 100644
              trans = ent->mPendingQ[i];
  
              // When this transaction has already established a half-open
+@@ -927,6 +944,7 @@
+                               "something mutated pending queue from "
+                               "GetConnection()");
+         }
++        delete [] ind;
+         if (conn) {
+             LOG(("  dispatching pending transaction...\n"));
+ 
 @@ -1011,6 +1026,19 @@ nsHttpConnectionMgr::AtActiveConnectionLimit(nsConnectionEntry *ent, PRUint8 cap
          maxPersistConns = mMaxPersistConnsPerHost;
      }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits