Backed out 3 changesets (bug 1334693) for build failures a=backout

Backed out changeset 8042ff76ef53 (bug 1334693)
Backed out changeset f48b85ae4eca (bug 1334693)
Backed out changeset 85c4356eebea (bug 1334693)

MozReview-Commit-ID: 2VFn68MXSmx
This commit is contained in:
Wes Kocher 2017-03-08 18:04:30 -08:00
parent 646b846105
commit 5d9e472591
6 changed files with 13 additions and 96 deletions

View File

@ -185,14 +185,12 @@ Http2PushedStream::ReadSegments(nsAHttpSegmentReader *reader,
nsresult rv = NS_OK;
*count = 0;
mozilla::OriginAttributes originAttributes;
switch (mUpstreamState) {
case GENERATING_HEADERS:
// The request headers for this has been processed, so we need to verify
// that :authority, :scheme, and :path MUST be present. :method MUST NOT be
// present
mSocketTransport->GetOriginAttributes(&originAttributes);
CreatePushHashKey(mHeaderScheme, mHeaderHost, originAttributes,
CreatePushHashKey(mHeaderScheme, mHeaderHost,
mSession->Serial(), mHeaderPath,
mOrigin, mHashKey);

View File

@ -21,7 +21,6 @@
#include "Http2Push.h"
#include "TunnelUtils.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/Telemetry.h"
#include "nsAlgorithm.h"
#include "nsHttp.h"
@ -347,7 +346,6 @@ Http2Stream::MakeOriginURL(const nsACString &scheme, const nsACString &origin,
void
Http2Stream::CreatePushHashKey(const nsCString &scheme,
const nsCString &hostHeader,
const mozilla::OriginAttributes &originAttributes,
uint64_t serial,
const nsCSubstring &pathInfo,
nsCString &outOrigin,
@ -371,11 +369,6 @@ Http2Stream::CreatePushHashKey(const nsCString &scheme,
}
outKey = outOrigin;
outKey.AppendLiteral("/[");
nsAutoCString suffix;
originAttributes.CreateSuffix(suffix);
outKey.Append(suffix);
outKey.Append(']');
outKey.AppendLiteral("/[http2.");
outKey.AppendInt(serial);
outKey.Append(']');
@ -431,11 +424,8 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
nsAutoCString requestURI;
head->RequestURI(requestURI);
mozilla::OriginAttributes originAttributes;
mSocketTransport->GetOriginAttributes(&originAttributes),
CreatePushHashKey(nsDependentCString(head->IsHTTPS() ? "https" : "http"),
authorityHeader, originAttributes, mSession->Serial(),
authorityHeader, mSession->Serial(),
requestURI,
mOrigin, hashkey);

View File

@ -18,10 +18,6 @@
class nsIInputStream;
class nsIOutputStream;
namespace mozilla{
class OriginAttributes;
}
namespace mozilla {
namespace net {
@ -169,7 +165,6 @@ public:
protected:
static void CreatePushHashKey(const nsCString &scheme,
const nsCString &hostHeader,
const mozilla::OriginAttributes &originAttributes,
uint64_t serial,
const nsCSubstring &pathInfo,
nsCString &outOrigin,
@ -226,9 +221,6 @@ protected:
virtual void AdjustInitialWindow();
MOZ_MUST_USE nsresult TransmitFrame(const char *, uint32_t *, bool forceCommitment);
// The underlying socket transport object is needed to propogate some events
nsISocketTransport *mSocketTransport;
private:
friend class nsAutoPtr<Http2Stream>;
@ -246,6 +238,9 @@ private:
// (i.e. don't change it or release it after it is set in the ctor).
RefPtr<nsAHttpTransaction> mTransaction;
// The underlying socket transport object is needed to propogate some events
nsISocketTransport *mSocketTransport;
// The quanta upstream data frames are chopped into
uint32_t mChunkSize;

View File

@ -3159,11 +3159,6 @@ nsHttpConnectionMgr::nsHalfOpenSocket::OnTransportStatus(nsITransport *trans,
newKey->AppendLiteral("~.:");
}
newKey->AppendInt(mEnt->mConnInfo->OriginPort());
newKey->AppendLiteral("/[");
nsAutoCString suffix;
mEnt->mConnInfo->GetOriginAttributes().CreateSuffix(suffix);
newKey->Append(suffix);
newKey->Append(']');
LOG(("nsHttpConnectionMgr::nsHalfOpenSocket::OnTransportStatus "
"STATUS_CONNECTING_TO Established New Coalescing Key # %d for host "
"%s [%s]", i, mEnt->mConnInfo->Origin(), newKey->get()));

View File

@ -148,9 +148,7 @@ Http2HeaderListener.prototype.onDataAvailable = function(request, ctx, stream, o
read_stream(stream, cnt);
};
var Http2PushListener = function(shouldBePushed) {
this.shouldBePushed = shouldBePushed;
};
var Http2PushListener = function() {};
Http2PushListener.prototype = new Http2CheckListener();
@ -160,7 +158,7 @@ Http2PushListener.prototype.onDataAvailable = function(request, ctx, stream, off
if (request.originalURI.spec == "https://localhost:" + serverPort + "/push.js" ||
request.originalURI.spec == "https://localhost:" + serverPort + "/push2.js" ||
request.originalURI.spec == "https://localhost:" + serverPort + "/push5.js") {
do_check_eq(request.getResponseHeader("pushed"), this.shouldBePushed ? "yes" : "no");
do_check_eq(request.getResponseHeader("pushed"), "yes");
}
read_stream(stream, cnt);
};
@ -494,42 +492,42 @@ function test_http2_cookie_crumbling() {
function test_http2_push1() {
var chan = makeChan("https://localhost:" + serverPort + "/push");
chan.loadGroup = loadGroup;
var listener = new Http2PushListener(true);
var listener = new Http2PushListener();
chan.asyncOpen2(listener);
}
function test_http2_push2() {
var chan = makeChan("https://localhost:" + serverPort + "/push.js");
chan.loadGroup = loadGroup;
var listener = new Http2PushListener(true);
var listener = new Http2PushListener();
chan.asyncOpen2(listener);
}
function test_http2_push3() {
var chan = makeChan("https://localhost:" + serverPort + "/push2");
chan.loadGroup = loadGroup;
var listener = new Http2PushListener(true);
var listener = new Http2PushListener();
chan.asyncOpen2(listener);
}
function test_http2_push4() {
var chan = makeChan("https://localhost:" + serverPort + "/push2.js");
chan.loadGroup = loadGroup;
var listener = new Http2PushListener(true);
var listener = new Http2PushListener();
chan.asyncOpen2(listener);
}
function test_http2_push5() {
var chan = makeChan("https://localhost:" + serverPort + "/push5");
chan.loadGroup = loadGroup;
var listener = new Http2PushListener(true);
var listener = new Http2PushListener();
chan.asyncOpen2(listener);
}
function test_http2_push6() {
var chan = makeChan("https://localhost:" + serverPort + "/push5.js");
chan.loadGroup = loadGroup;
var listener = new Http2PushListener(true);
var listener = new Http2PushListener();
chan.asyncOpen2(listener);
}
@ -901,54 +899,6 @@ function test_http2_empty_data() {
chan.asyncOpen2(listener);
}
function test_http2_push_firstparty1() {
var chan = makeChan("https://localhost:" + serverPort + "/push");
chan.loadGroup = loadGroup;
chan.loadInfo.originAttributes = { firstPartyDomain: "foo.com" };
var listener = new Http2PushListener(true);
chan.asyncOpen2(listener);
}
function test_http2_push_firstparty2() {
var chan = makeChan("https://localhost:" + serverPort + "/push.js");
chan.loadGroup = loadGroup;
chan.loadInfo.originAttributes = { firstPartyDomain: "bar.com" };
var listener = new Http2PushListener(false);
chan.asyncOpen2(listener);
}
function test_http2_push_firstparty3() {
var chan = makeChan("https://localhost:" + serverPort + "/push.js");
chan.loadGroup = loadGroup;
chan.loadInfo.originAttributes = { firstPartyDomain: "foo.com" };
var listener = new Http2PushListener(true);
chan.asyncOpen2(listener);
}
function test_http2_push_userContext1() {
var chan = makeChan("https://localhost:" + serverPort + "/push");
chan.loadGroup = loadGroup;
chan.loadInfo.originAttributes = { userContextId: 1 };
var listener = new Http2PushListener(true);
chan.asyncOpen2(listener);
}
function test_http2_push_userContext2() {
var chan = makeChan("https://localhost:" + serverPort + "/push.js");
chan.loadGroup = loadGroup;
chan.loadInfo.originAttributes = { userContextId: 2 };
var listener = new Http2PushListener(false);
chan.asyncOpen2(listener);
}
function test_http2_push_userContext3() {
var chan = makeChan("https://localhost:" + serverPort + "/push.js");
chan.loadGroup = loadGroup;
chan.loadInfo.originAttributes = { userContextId: 1 };
var listener = new Http2PushListener(true);
chan.asyncOpen2(listener);
}
function test_complete() {
resetPrefs();
do_test_pending();
@ -1001,12 +951,6 @@ var tests = [ test_http2_post_big
, test_http2_h11required_session
, test_http2_retry_rst
, test_http2_wrongsuite
, test_http2_push_firstparty1
, test_http2_push_firstparty2
, test_http2_push_firstparty3
, test_http2_push_userContext1
, test_http2_push_userContext2
, test_http2_push_userContext3
// cleanup
, test_complete

View File

@ -277,11 +277,6 @@ function handleRequest(req, res) {
content = '<head> <script src="push.js"/></head>body text';
}
else if (u.pathname === "/push.js") {
content = '// comments';
res.setHeader("pushed", "no");
}
else if (u.pathname === "/push2") {
push = res.push('/push2.js');
push.writeHead(200, {