Bug 1479898 - P1. Only set false to APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT when it is not timeout. r=francois
authorDimi Lee <dlee@mozilla.com>
Thu, 20 Sep 2018 00:18:12 +0000
changeset 437445 5d39eab1a17c0d19916cabd1ab7cc8ac8eeec2ac
parent 437444 9d576eb300e650b9e50fc197c3d2027291d10c29
child 437446 4d2c3be4d7256e678be7189dedddaeaea7126f8f
push id34683
push userapavel@mozilla.com
push dateThu, 20 Sep 2018 21:54:05 +0000
treeherdermozilla-central@4d3cd0ab7277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1479898
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1479898 - P1. Only set false to APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT when it is not timeout. r=francois Right now no matter it is timeout or not, we will always add the counter to the false case of APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT. We should only set the counter(false) when it is not timeout. Differential Revision: https://phabricator.services.mozilla.com/D5263
toolkit/components/reputationservice/ApplicationReputation.cpp
--- a/toolkit/components/reputationservice/ApplicationReputation.cpp
+++ b/toolkit/components/reputationservice/ApplicationReputation.cpp
@@ -1610,18 +1610,22 @@ PendingLookup::OnStartRequest(nsIRequest
 NS_IMETHODIMP
 PendingLookup::OnStopRequest(nsIRequest *aRequest,
                              nsISupports *aContext,
                              nsresult aResult) {
   NS_ENSURE_STATE(mCallback);
 
   bool shouldBlock = false;
   uint32_t verdict = nsIApplicationReputationService::VERDICT_SAFE;
-  Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT,
-    false);
+
+  if (aResult != NS_ERROR_NET_TIMEOUT) {
+    Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_REMOTE_LOOKUP_TIMEOUT,
+      false);
+  }
+
 
   nsresult rv = OnStopRequestInternal(aRequest, aContext, aResult,
                                       &shouldBlock, &verdict);
   OnComplete(shouldBlock, rv, verdict);
   return rv;
 }
 
 nsresult