diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-29 23:20:36 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-29 23:20:36 +0200 |
commit | 81b341a9b37acae2b60e0334a9b0846bc5be8445 (patch) | |
tree | b998e480ac1971ea93101510438ba1e87d9db82a | |
parent | ddf29811b2d95bdf8385b9eb85519332b69344ca (diff) | |
download | UXP-81b341a9b37acae2b60e0334a9b0846bc5be8445.tar UXP-81b341a9b37acae2b60e0334a9b0846bc5be8445.tar.gz UXP-81b341a9b37acae2b60e0334a9b0846bc5be8445.tar.lz UXP-81b341a9b37acae2b60e0334a9b0846bc5be8445.tar.xz UXP-81b341a9b37acae2b60e0334a9b0846bc5be8445.zip |
Clean up a number of unused variables.
Tag #21.
-rw-r--r-- | devtools/shared/heapsnapshot/HeapSnapshot.cpp | 2 | ||||
-rw-r--r-- | dom/geolocation/nsGeolocation.cpp | 12 | ||||
-rw-r--r-- | extensions/cookie/nsPermissionManager.cpp | 6 | ||||
-rw-r--r-- | gfx/layers/ipc/CompositorBridgeParent.cpp | 2 | ||||
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 1 | ||||
-rw-r--r-- | layout/base/nsPresShell.cpp | 5 | ||||
-rw-r--r-- | netwerk/base/nsSocketTransportService2.cpp | 36 | ||||
-rw-r--r-- | netwerk/base/nsUDPSocket.cpp | 6 | ||||
-rw-r--r-- | netwerk/cookie/nsCookieService.cpp | 7 |
9 files changed, 0 insertions, 77 deletions
diff --git a/devtools/shared/heapsnapshot/HeapSnapshot.cpp b/devtools/shared/heapsnapshot/HeapSnapshot.cpp index ef0bde948..b7b20dc17 100644 --- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp +++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp @@ -1616,8 +1616,6 @@ ThreadSafeChromeUtils::ReadHeapSnapshot(GlobalObject& global, const nsAString& filePath, ErrorResult& rv) { - auto start = TimeStamp::Now(); - UniquePtr<char[]> path(ToNewCString(filePath)); if (!path) { rv.Throw(NS_ERROR_OUT_OF_MEMORY); diff --git a/dom/geolocation/nsGeolocation.cpp b/dom/geolocation/nsGeolocation.cpp index 201d4d89a..244018ee8 100644 --- a/dom/geolocation/nsGeolocation.cpp +++ b/dom/geolocation/nsGeolocation.cpp @@ -395,18 +395,6 @@ nsGeolocationRequest::Allow(JS::HandleValue aChoices) { MOZ_ASSERT(aChoices.isUndefined()); - if (mRequester) { - // Record whether a location callback is fulfilled while the owner window - // is not visible. - bool isVisible = false; - nsCOMPtr<nsPIDOMWindowInner> window = mLocator->GetParentObject(); - - if (window) { - nsCOMPtr<nsIDocument> doc = window->GetDoc(); - isVisible = doc && !doc->Hidden(); - } - } - if (mLocator->ClearPendingRequest(this)) { return NS_OK; } diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp index 13ae7fd35..2c2e2d79c 100644 --- a/extensions/cookie/nsPermissionManager.cpp +++ b/extensions/cookie/nsPermissionManager.cpp @@ -1076,8 +1076,6 @@ nsPermissionManager::InitDB(bool aRemoveFile) bool hostsTableExists = false; mDBConn->TableExists(NS_LITERAL_CSTRING("moz_hosts"), &hostsTableExists); if (hostsTableExists) { - bool migrationError = false; - // Both versions 4 and 6 have a version 4 formatted hosts table named // moz_hosts. We can migrate this table to our version 7 table moz_perms. // If moz_perms is present, then we can use it as a basis for comparison. @@ -1125,12 +1123,10 @@ nsPermissionManager::InitDB(bool aRemoveFile) // Read in the old row rv = stmt->GetUTF8String(0, host); if (NS_WARN_IF(NS_FAILED(rv))) { - migrationError = true; continue; } rv = stmt->GetUTF8String(1, type); if (NS_WARN_IF(NS_FAILED(rv))) { - migrationError = true; continue; } permission = stmt->AsInt32(2); @@ -1138,7 +1134,6 @@ nsPermissionManager::InitDB(bool aRemoveFile) expireTime = stmt->AsInt64(4); modificationTime = stmt->AsInt64(5); if (NS_WARN_IF(stmt->AsInt64(6) < 0)) { - migrationError = true; continue; } appId = static_cast<uint32_t>(stmt->AsInt64(6)); @@ -1155,7 +1150,6 @@ nsPermissionManager::InitDB(bool aRemoveFile) if (NS_FAILED(rv)) { NS_WARNING("Unexpected failure when upgrading migrating permission " "from host to origin"); - migrationError = true; } } diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index e31c6ceb6..00602fab5 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -482,8 +482,6 @@ CompositorVsyncScheduler::Composite(TimeStamp aVsyncTimestamp) mLastCompose = aVsyncTimestamp; ComposeToTarget(nullptr); mVsyncNotificationsSkipped = 0; - - TimeDuration compositeFrameTotal = TimeStamp::Now() - aVsyncTimestamp; } else if (mVsyncNotificationsSkipped++ > gfxPrefs::CompositorUnobserveCount()) { UnobserveVsync(); } diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index d0f790a0b..c1f4ad372 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -3423,7 +3423,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram return NS_OK; } - TimeStamp startBuildDisplayList = TimeStamp::Now(); nsDisplayListBuilder builder(aFrame, aBuilderMode, !(aFlags & PaintFrameFlags::PAINT_HIDE_CARET)); if (aFlags & PaintFrameFlags::PAINT_IN_TRANSFORM) { diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 88539dc4a..340042b46 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1111,10 +1111,6 @@ PresShell::Destroy() LogTextPerfStats(tp, this, tp->cumulative, 0.0, eLog_totals, nullptr); } } - if (mPresContext) { - const bool mayFlushUserFontSet = false; - gfxUserFontSet* fs = mPresContext->GetUserFontSet(mayFlushUserFontSet); - } #ifdef MOZ_REFLOW_PERF DumpReflows(); @@ -9409,7 +9405,6 @@ PresShell::ProcessReflowCommands(bool aInterruptible) return true; } - mozilla::TimeStamp timerStart = mozilla::TimeStamp::Now(); bool interrupted = false; if (!mDirtyRoots.IsEmpty()) { diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketTransportService2.cpp index 72afdc9e1..739388b0f 100644 --- a/netwerk/base/nsSocketTransportService2.cpp +++ b/netwerk/base/nsSocketTransportService2.cpp @@ -471,9 +471,6 @@ nsSocketTransportService::Poll(uint32_t *interval, PRIntervalTime ts = PR_IntervalNow(); TimeStamp pollStart; - if (mTelemetryEnabledPref) { - pollStart = TimeStamp::NowLoRes(); - } SOCKET_LOG((" timeout = %i milliseconds\n", PR_IntervalToMilliseconds(pollTimeout))); @@ -481,10 +478,6 @@ nsSocketTransportService::Poll(uint32_t *interval, PRIntervalTime passedInterval = PR_IntervalNow() - ts; - if (mTelemetryEnabledPref && !pollStart.IsNull()) { - *pollDuration = TimeStamp::NowLoRes() - pollStart; - } - SOCKET_LOG((" ...returned after %i milliseconds\n", PR_IntervalToMilliseconds(passedInterval))); @@ -858,20 +851,9 @@ nsSocketTransportService::Run() // make sure the pseudo random number generator is seeded on this thread srand(static_cast<unsigned>(PR_Now())); - // For the calculation of the duration of the last cycle (i.e. the last for-loop - // iteration before shutdown). - TimeStamp startOfCycleForLastCycleCalc; - int numberOfPendingEventsLastCycle; - - // For measuring of the poll iteration duration without time spent blocked - // in poll(). - TimeStamp pollCycleStart; // Time blocked in poll(). TimeDuration singlePollDuration; - // For calculating the time needed for a new element to run. - TimeStamp startOfIteration; - TimeStamp startOfNextIteration; int numberOfPendingEvents; // If there is too many pending events queued, we will run some poll() @@ -883,18 +865,9 @@ nsSocketTransportService::Run() bool pendingEvents = false; numberOfPendingEvents = 0; - numberOfPendingEventsLastCycle = 0; - if (mTelemetryEnabledPref) { - startOfCycleForLastCycleCalc = TimeStamp::NowLoRes(); - startOfNextIteration = TimeStamp::NowLoRes(); - } pollDuration = 0; do { - if (mTelemetryEnabledPref) { - pollCycleStart = TimeStamp::NowLoRes(); - } - DoPollIteration(&singlePollDuration); mRawThread->HasPendingEvents(&pendingEvents); @@ -909,15 +882,6 @@ nsSocketTransportService::Run() } else { mServingPendingQueue = true; } - - if (mTelemetryEnabledPref) { - startOfIteration = startOfNextIteration; - // Everything that comes after this point will - // be served in the next iteration. If no even - // arrives, startOfNextIteration will be reset at the - // beginning of each for-loop. - startOfNextIteration = TimeStamp::NowLoRes(); - } } TimeStamp eventQueueStart = TimeStamp::NowLoRes(); do { diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp index 24f3954cb..445b62d9c 100644 --- a/netwerk/base/nsUDPSocket.cpp +++ b/netwerk/base/nsUDPSocket.cpp @@ -770,12 +770,6 @@ nsUDPSocket::CloseSocket() // If shutdown last to long, let the socket leak and do not close it. UDPSOCKET_LOG(("Intentional leak")); } else { - - PRIntervalTime closeStarted = 0; - if (gSocketTransportService->IsTelemetryEnabledAndNotSleepPhase()) { - closeStarted = PR_IntervalNow(); - } - PR_Close(mFD); } mFD = nullptr; diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index ea54dbd61..7bc5abcd1 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -3311,13 +3311,6 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI, // so we can handle them separately. bool newCookie = ParseAttributes(aCookieHeader, cookieAttributes); - // Collect telemetry on how often secure cookies are set from non-secure - // origins, and vice-versa. - // - // 0 = nonsecure and "http:" - // 1 = nonsecure and "https:" - // 2 = secure and "http:" - // 3 = secure and "https:" bool isHTTPS; nsresult rv = aHostURI->SchemeIs("https", &isHTTPS); |