Backed out changeset e157b95e9b5e (bug 1505948) for HttpChannelChild.cpp build bustages CLOSED TREE

This commit is contained in:
Ciure Andrei 2018-11-14 23:41:01 +02:00
Родитель 2eeb080252
Коммит 92c9686945
9 изменённых файлов: 14 добавлений и 55 удалений

Просмотреть файл

@ -74,15 +74,6 @@ extern mozilla::LazyLogModule gHttpLog;
typedef nsTArray<Tuple<nsCString, nsCString>> ArrayOfStringPairs;
enum CacheDisposition : uint8_t {
kCacheUnresolved = 0,
kCacheHit = 1,
kCacheHitViaReval = 2,
kCacheMissedViaReval = 3,
kCacheMissed = 4,
kCacheUnknown = 5
};
/*
* This class is a partial implementation of nsIHttpChannel. It contains code
* shared by nsHttpChannel and HttpChannelChild.

Просмотреть файл

@ -1231,7 +1231,6 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
profiler_add_network_marker(mURI, priority, mChannelId, NetworkLoadType::LOAD_STOP,
mLastStatusReported, TimeStamp::Now(),
mTransferSize,
kCacheUnknown,
&mTransactionTimings);
}
#endif
@ -1882,7 +1881,7 @@ HttpChannelChild::Redirect1Begin(const uint32_t& registrarId,
PROFILER_ADD_NETWORK_MARKER(mURI, mPriority, channelId, NetworkLoadType::LOAD_REDIRECT,
mLastStatusReported, TimeStamp::Now(),
0, kCacheUnknown,
0,
&mTransactionTimings,
uri);
@ -2677,7 +2676,7 @@ HttpChannelChild::AsyncOpen(nsIStreamListener *listener, nsISupports *aContext)
mLastStatusReported = TimeStamp::Now();
PROFILER_ADD_NETWORK_MARKER(mURI, mPriority, mChannelId, NetworkLoadType::LOAD_START,
mChannelCreationTimestamp, mLastStatusReported,
0, kCacheUnknown, nullptr, nullptr);
0, nullptr, nullptr);
mIsPending = true;
mWasOpened = true;

Просмотреть файл

@ -162,6 +162,13 @@ static uint32_t sRCWNMaxWaitMs = 500;
static NS_DEFINE_CID(kStreamListenerTeeCID, NS_STREAMLISTENERTEE_CID);
enum CacheDisposition {
kCacheHit = 1,
kCacheHitViaReval = 2,
kCacheMissedViaReval = 3,
kCacheMissed = 4
};
using mozilla::Telemetry::LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED;
static const struct {
@ -324,7 +331,6 @@ AutoRedirectVetoNotifier::ReportRedirectResult(bool succeeded)
nsHttpChannel::nsHttpChannel()
: HttpAsyncAborter<nsHttpChannel>(this)
, mCacheDisposition(kCacheUnresolved)
, mLogicalOffset(0)
, mPostID(0)
, mRequestTime(0)
@ -936,7 +942,6 @@ nsHttpChannel::ContinueConnect()
}
AccumulateCacheHitTelemetry(kCacheHit);
mCacheDisposition = kCacheHit;
return rv;
}
@ -2744,7 +2749,6 @@ nsHttpChannel::ContinueProcessResponse2(nsresult rv)
cacheDisposition = kCacheMissedViaReval;
}
AccumulateCacheHitTelemetry(cacheDisposition);
mCacheDisposition = cacheDisposition;
Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_VERSION,
static_cast<uint32_t>(mResponseHead->Version()));
@ -5889,7 +5893,7 @@ nsHttpChannel::ContinueProcessRedirectionAfterFallback(nsresult rv)
GetPriority(&priority);
profiler_add_network_marker(mURI, priority, mChannelId, NetworkLoadType::LOAD_REDIRECT,
mLastStatusReported, TimeStamp::Now(),
mLogicalOffset, mCacheDisposition, nullptr,
mLogicalOffset, nullptr,
mRedirectURI);
}
#endif
@ -6344,7 +6348,7 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context)
if (profiler_is_active()) {
profiler_add_network_marker(mURI, mPriority, mChannelId, NetworkLoadType::LOAD_START,
mChannelCreationTimestamp, mLastStatusReported,
0, mCacheDisposition);
0);
}
#endif
@ -7734,7 +7738,7 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
profiler_add_network_marker(uri, priority, mChannelId, NetworkLoadType::LOAD_STOP,
mLastStatusReported, TimeStamp::Now(),
mLogicalOffset,
mCacheDisposition, &mTransactionTimings, nullptr);
&mTransactionTimings);
}
#endif

Просмотреть файл

@ -286,8 +286,6 @@ public:
already_AddRefed<TabPromise> TakeRedirectTabPromise() { return mRedirectTabPromise.forget(); }
uint64_t CrossProcessRedirectIdentifier() { return mCrossProcessRedirectIdentifier; }
CacheDisposition mCacheDisposition;
protected:
virtual ~nsHttpChannel();

Просмотреть файл

@ -12,7 +12,6 @@
#include "Layers.h"
#include "mozilla/Sprintf.h"
#include "mozilla/Maybe.h"
#include "mozilla/net/HttpBaseChannel.h"
using namespace mozilla;
@ -157,25 +156,6 @@ static const char *GetNetworkState(NetworkLoadType aType)
return "";
}
static const char *GetCacheState(mozilla::net::CacheDisposition aCacheDisposition)
{
switch (aCacheDisposition) {
case mozilla::net::kCacheUnresolved:
return "Unresolved";
case mozilla::net::kCacheHit:
return "Hit";
case mozilla::net::kCacheHitViaReval:
return "HitViaReval";
case mozilla::net::kCacheMissedViaReval:
return "MissedViaReval";
case mozilla::net::kCacheMissed:
return "Missed";
case mozilla::net::kCacheUnknown:
default:
return nullptr;
}
return nullptr;
}
void
NetworkMarkerPayload::StreamPayload(SpliceableJSONWriter& aWriter,
@ -185,12 +165,8 @@ NetworkMarkerPayload::StreamPayload(SpliceableJSONWriter& aWriter,
StreamCommonProps("Network", aWriter, aProcessStartTime, aUniqueStacks);
aWriter.IntProperty("id", mID);
const char *typeString = GetNetworkState(mType);
const char *cacheString = GetCacheState(mCacheDisposition);
// want to use aUniqueStacks.mUniqueStrings->WriteElement(aWriter, typeString);
aWriter.StringProperty("status", typeString);
if (cacheString) {
aWriter.StringProperty("cache", cacheString);
}
aWriter.IntProperty("pri", mPri);
if (mCount > 0) {
aWriter.IntProperty("count", mCount);

Просмотреть файл

@ -3765,7 +3765,6 @@ profiler_add_network_marker(nsIURI* aURI,
mozilla::TimeStamp aStart,
mozilla::TimeStamp aEnd,
int64_t aCount,
mozilla::net::CacheDisposition aCacheDisposition,
const mozilla::net::TimingStruct* aTimings,
nsIURI* aRedirectURI)
{
@ -3793,7 +3792,6 @@ profiler_add_network_marker(nsIURI* aURI,
aEnd,
aPriority,
aCount,
aCacheDisposition,
aTimings,
PromiseFlatCString(redirect_spec).get()));
}

Просмотреть файл

@ -95,8 +95,6 @@ if CONFIG['MOZ_GECKO_PROFILER']:
'/docshell/base',
'/ipc/chromium/src',
'/mozglue/linker',
'/netwerk/base',
'/netwerk/protocol/http',
'/toolkit/crashreporter/google-breakpad/src',
'/tools/profiler/core/',
'/tools/profiler/gecko/',

Просмотреть файл

@ -93,7 +93,6 @@ class SpliceableJSONWriter;
namespace mozilla {
namespace net {
struct TimingStruct;
enum CacheDisposition : uint8_t;
}
}
class nsIURI;
@ -608,8 +607,8 @@ enum class NetworkLoadType {
LOAD_REDIRECT
};
#define PROFILER_ADD_NETWORK_MARKER(uri, pri, channel, type, start, end, count, cache, timings, redirect) \
profiler_add_network_marker(uri, pri, channel, type, start, end, count, cache, timings, redirect)
#define PROFILER_ADD_NETWORK_MARKER(uri, pri, channel, type, start, end, count, timings, redirect) \
profiler_add_network_marker(uri, pri, channel, type, start, end, count, timings, redirect)
void profiler_add_network_marker(nsIURI* aURI,
int32_t aPriority,
@ -618,7 +617,6 @@ void profiler_add_network_marker(nsIURI* aURI,
mozilla::TimeStamp aStart,
mozilla::TimeStamp aEnd,
int64_t aCount,
mozilla::net::CacheDisposition aCacheDisposition,
const mozilla::net::TimingStruct* aTimings = nullptr,
nsIURI* aRedirectURI = nullptr);

Просмотреть файл

@ -262,7 +262,6 @@ public:
const mozilla::TimeStamp& aEndTime,
int32_t aPri,
int64_t aCount,
mozilla::net::CacheDisposition aCacheDisposition,
const mozilla::net::TimingStruct* aTimings = nullptr,
const char* aRedirectURI = nullptr)
: ProfilerMarkerPayload(aStartTime, aEndTime, mozilla::Nothing())
@ -274,7 +273,6 @@ public:
, mType(aType)
, mPri(aPri)
, mCount(aCount)
, mCacheDisposition(aCacheDisposition)
{
if (aTimings) {
mTimings = *aTimings;
@ -291,7 +289,6 @@ private:
int32_t mPri;
int64_t mCount;
mozilla::net::TimingStruct mTimings;
mozilla::net::CacheDisposition mCacheDisposition;
};
class ScreenshotPayload : public ProfilerMarkerPayload