summaryrefslogtreecommitdiffstats
path: root/netwerk/base
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/base')
-rw-r--r--netwerk/base/nsIOService.cpp4
-rw-r--r--netwerk/base/nsNetUtilInlines.h4
-rw-r--r--netwerk/base/nsSocketTransportService2.cpp36
-rw-r--r--netwerk/base/nsUDPSocket.cpp6
4 files changed, 6 insertions, 44 deletions
diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp
index e13541acf..435294315 100644
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -789,7 +789,9 @@ nsIOService::NewChannelFromURIWithProxyFlagsInternal(nsIURI* aURI,
// creating a new channel by calling NewChannel().
if (NS_FAILED(rv)) {
rv = handler->NewChannel(aURI, getter_AddRefs(channel));
- NS_ENSURE_SUCCESS(rv, rv);
+ if (NS_FAILED(rv)) {
+ return rv;
+ }
// The protocol handler does not implement NewChannel2, so
// maybe we need to wrap the channel (see comment in MaybeWrap
// function).
diff --git a/netwerk/base/nsNetUtilInlines.h b/netwerk/base/nsNetUtilInlines.h
index 7003814d5..b831ec2e7 100644
--- a/netwerk/base/nsNetUtilInlines.h
+++ b/netwerk/base/nsNetUtilInlines.h
@@ -224,7 +224,9 @@ NS_NewChannelInternal(nsIChannel **outChannel,
aUri,
aLoadInfo,
getter_AddRefs(channel));
- NS_ENSURE_SUCCESS(rv, rv);
+ if (NS_FAILED(rv)) {
+ return rv;
+ }
if (aLoadGroup) {
rv = channel->SetLoadGroup(aLoadGroup);
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;