Bug 1593162 - Remove the expired telemetry probes added in bug 1127552; r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D51335

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-11-01 13:43:15 +00:00
Родитель d5ff37172c
Коммит 03fa12d685
10 изменённых файлов: 1 добавлений и 53 удалений

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

@ -36,7 +36,6 @@
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/URLSearchParams.h"
#include "mozilla/net/CookieSettings.h"
#include "mozilla/Telemetry.h"
#include "BodyExtractor.h"
#include "EmptyBody.h"
@ -508,8 +507,6 @@ already_AddRefed<Promise> FetchRequest(nsIGlobalObject* aGlobal,
}
}
Telemetry::Accumulate(Telemetry::FETCH_IS_MAINTHREAD, 1);
RefPtr<MainThreadFetchResolver> resolver = new MainThreadFetchResolver(
p, observer, signalImpl, request->MozErrors());
RefPtr<FetchDriver> fetch = new FetchDriver(
@ -526,8 +523,6 @@ already_AddRefed<Promise> FetchRequest(nsIGlobalObject* aGlobal,
WorkerPrivate* worker = GetCurrentThreadWorkerPrivate();
MOZ_ASSERT(worker);
Telemetry::Accumulate(Telemetry::FETCH_IS_MAINTHREAD, 0);
if (worker->IsServiceWorker()) {
r->SetSkipServiceWorker();
}

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

@ -369,9 +369,6 @@ nsresult FetchDriver::Fetch(AbortSignalImpl* aSignalImpl,
mObserver = aObserver;
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_REQUEST_PASSTHROUGH,
mRequest->WasCreatedByFetchEvent());
// FIXME(nsm): Deal with HSTS.
MOZ_RELEASE_ASSERT(!mRequest->IsSynchronous(),

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

@ -39,7 +39,6 @@ struct IPCInternalRequest {
RequestRedirect requestRedirect;
nsString integrity;
nsCString fragment;
bool createdByFetchEvent;
PrincipalInfo? principalInfo;
};

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

@ -52,7 +52,6 @@ already_AddRefed<InternalRequest> InternalRequest::GetRequestConstructorCopy(
copy->mCredentialsMode = mCredentialsMode;
copy->mCacheMode = mCacheMode;
copy->mRedirectMode = mRedirectMode;
copy->mCreatedByFetchEvent = mCreatedByFetchEvent;
copy->mContentPolicyTypeOverridden = mContentPolicyTypeOverridden;
copy->mPreferredAlternativeDataType = mPreferredAlternativeDataType;
@ -166,7 +165,6 @@ InternalRequest::InternalRequest(const InternalRequest& aOther)
mSynchronous(aOther.mSynchronous),
mUnsafeRequest(aOther.mUnsafeRequest),
mUseURLCredentials(aOther.mUseURLCredentials),
mCreatedByFetchEvent(aOther.mCreatedByFetchEvent),
mContentPolicyTypeOverridden(aOther.mContentPolicyTypeOverridden) {
// NOTE: does not copy body stream... use the fallible Clone() for that
}
@ -188,8 +186,7 @@ InternalRequest::InternalRequest(const IPCInternalRequest& aIPCRequest)
mCacheMode(aIPCRequest.cacheMode()),
mRedirectMode(aIPCRequest.requestRedirect()),
mIntegrity(aIPCRequest.integrity()),
mFragment(aIPCRequest.fragment()),
mCreatedByFetchEvent(aIPCRequest.createdByFetchEvent()) {
mFragment(aIPCRequest.fragment()) {
if (aIPCRequest.principalInfo()) {
mPrincipalInfo = MakeUnique<mozilla::ipc::PrincipalInfo>(
aIPCRequest.principalInfo().ref());
@ -231,7 +228,6 @@ void InternalRequest::ToIPC(
aIPCRequest->requestRedirect() = mRedirectMode;
aIPCRequest->integrity() = mIntegrity;
aIPCRequest->fragment() = mFragment;
aIPCRequest->createdByFetchEvent() = mCreatedByFetchEvent;
if (mPrincipalInfo) {
aIPCRequest->principalInfo().emplace(*mPrincipalInfo);

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

@ -308,12 +308,6 @@ class InternalRequest final {
already_AddRefed<InternalRequest> GetRequestConstructorCopy(
nsIGlobalObject* aGlobal, ErrorResult& aRv) const;
bool WasCreatedByFetchEvent() const { return mCreatedByFetchEvent; }
void SetCreatedByFetchEvent() { mCreatedByFetchEvent = true; }
void ClearCreatedByFetchEvent() { mCreatedByFetchEvent = false; }
bool IsNavigationRequest() const;
bool IsWorkerRequest() const;
@ -415,10 +409,6 @@ class InternalRequest final {
MOZ_INIT_OUTSIDE_CTOR bool mSynchronous;
MOZ_INIT_OUTSIDE_CTOR bool mUnsafeRequest;
MOZ_INIT_OUTSIDE_CTOR bool mUseURLCredentials;
// This is only set when a Request object is created by a fetch event. We
// use it to check if Service Workers are simply fetching intercepted Request
// objects without modifying them.
bool mCreatedByFetchEvent = false;
// This is only set when Request.overrideContentPolicyType() has been set.
// It is illegal to pass such a Request object to a fetch() method unless
// if the caller has chrome privileges.

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

@ -437,12 +437,10 @@ already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
request->SetPrincipalInfo(std::move(principalInfo));
if (mode != RequestMode::EndGuard_) {
request->ClearCreatedByFetchEvent();
request->SetMode(mode);
}
if (credentials != RequestCredentials::EndGuard_) {
request->ClearCreatedByFetchEvent();
request->SetCredentialsMode(credentials);
}
@ -456,7 +454,6 @@ already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
aRv.ThrowTypeError<MSG_ONLY_IF_CACHED_WITHOUT_SAME_ORIGIN>(modeString);
return nullptr;
}
request->ClearCreatedByFetchEvent();
request->SetCacheMode(cache);
}
@ -488,7 +485,6 @@ already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
}
// Step 14.2
request->ClearCreatedByFetchEvent();
request->SetMethod(outMethod);
}
@ -501,7 +497,6 @@ already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
if (aRv.Failed()) {
return nullptr;
}
request->ClearCreatedByFetchEvent();
headers = h->GetInternalHeaders();
} else {
headers = new InternalHeaders(*requestHeaders);
@ -571,8 +566,6 @@ already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
return nullptr;
}
request->ClearCreatedByFetchEvent();
if (hasCopiedBody) {
request->SetBody(nullptr, 0);
}

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

@ -326,7 +326,6 @@ nsresult GetIPCInternalRequest(nsIInterceptedChannel* aChannel,
requestRedirect, requestCredentials, referrer, referrerPolicy,
contentPolicyType, integrity);
internalRequest->SetBody(uploadStream, uploadStreamContentLength);
internalRequest->SetCreatedByFetchEvent();
nsAutoCString alternativeDataType;
if (cacheInfoChannel &&

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

@ -1429,9 +1429,6 @@ class FetchEventRunnable : public ExtendableFunctionalEventWorkerRunnable,
mRequestMode, mRequestRedirect, mRequestCredentials, mReferrer,
mReferrerPolicy, mContentPolicyType, mIntegrity);
internalReq->SetBody(mUploadStream, mUploadStreamContentLength);
// For Telemetry, note that this Request object was created by a Fetch
// event.
internalReq->SetCreatedByFetchEvent();
nsCOMPtr<nsIChannel> channel;
nsresult rv = mInterceptedChannel->GetChannel(getter_AddRefs(channel));

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

@ -597,13 +597,6 @@
"releaseChannelCollection": "opt-out",
"description": "GPU Device Reset Reason (ok, hung, removed, reset, internal error, invalid call, out of memory)"
},
"FETCH_IS_MAINTHREAD": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"expires_in_version": "50",
"kind": "boolean",
"description": "Was Fetch request initiated from the main thread?"
},
"FORCED_DEVICE_RESET_REASON": {
"record_in_processes": ["main", "content", "gpu"],
"products": ["firefox", "fennec", "geckoview"],
@ -12202,13 +12195,6 @@
"description": "Time (in ms) measured between when the fetch handler finished executing and when we reset the network channel."
},
"SERVICE_WORKER_REQUEST_PASSTHROUGH": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"expires_in_version": "50",
"kind": "boolean",
"description": "Intercepted fetch sending back same Request object. File bugs in Core::DOM in case of a Telemetry regression."
},
"ONBEFOREUNLOAD_PROMPT_ACTION" : {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],

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

@ -134,7 +134,6 @@
"FENNEC_TABQUEUE_QUEUESIZE",
"FENNEC_TOPSITES_LOADER_TIME_MS",
"FENNEC_WAS_KILLED",
"FETCH_IS_MAINTHREAD",
"FONTLIST_INITFACENAMELISTS",
"FONTLIST_INITOTHERFAMILYNAMES",
"FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING",
@ -355,7 +354,6 @@
"SERVICE_WORKER_LIFE_TIME",
"SERVICE_WORKER_REGISTRATIONS",
"SERVICE_WORKER_REGISTRATION_LOADING",
"SERVICE_WORKER_REQUEST_PASSTHROUGH",
"SERVICE_WORKER_SPAWN_ATTEMPTS",
"SERVICE_WORKER_UPDATED",
"SERVICE_WORKER_WAS_SPAWNED",
@ -587,7 +585,6 @@
"FENNEC_TABQUEUE_QUEUESIZE",
"FENNEC_TOPSITES_LOADER_TIME_MS",
"FENNEC_WAS_KILLED",
"FETCH_IS_MAINTHREAD",
"FIND_PLUGINS",
"FONTLIST_INITFACENAMELISTS",
"FONTLIST_INITOTHERFAMILYNAMES",
@ -904,7 +901,6 @@
"SERVICE_WORKER_LIFE_TIME",
"SERVICE_WORKER_REGISTRATIONS",
"SERVICE_WORKER_REGISTRATION_LOADING",
"SERVICE_WORKER_REQUEST_PASSTHROUGH",
"SERVICE_WORKER_SPAWN_ATTEMPTS",
"SERVICE_WORKER_UPDATED",
"SERVICE_WORKER_WAS_SPAWNED",