1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Clean up a number of unused variables.

Tag #21.
This commit is contained in:
wolfbeast
2018-09-29 23:20:36 +02:00
committed by Roy Tam
parent 1f4a5663e9
commit 57251fc4e7
9 changed files with 0 additions and 77 deletions
@@ -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);
-12
View File
@@ -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;
}
@@ -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;
}
}
@@ -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();
}
-1
View File
@@ -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) {
-5
View File
@@ -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()) {
@@ -475,9 +475,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)));
@@ -485,10 +482,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)));
@@ -862,20 +855,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()
@@ -887,18 +869,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);
@@ -913,15 +886,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 {
-6
View File
@@ -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;
-7
View File
@@ -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);