Bug 1163909 - Remove nsFtpState::mSessionStartTime, which is dead. r=mcmanus.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 12 May 2015 00:28:31 -0700
changeset 243621 8d4411ad492bff3a79fe372b35257eea52fb57ce
parent 243620 c82a5daaa03caae9047614b7c6035c84533e0a82
child 243622 6f6fd4dfe3a35c8a06548fa0e0d78d8eba08da46
push id28744
push userkwierso@gmail.com
push dateWed, 13 May 2015 18:12:16 +0000
treeherdermozilla-central@324c3423deaf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1163909
milestone41.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 1163909 - Remove nsFtpState::mSessionStartTime, which is dead. r=mcmanus. This eliminates a static constructor.
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.h
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -1598,24 +1598,16 @@ nsFtpState::R_opts() {
     // Ignore error code because "OPTS UTF8 ON" is for compatibility of
     // FTP server using IETF draft
     return FTP_S_PWD;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIRequest methods:
 
-static inline
-uint32_t GetFtpTime()
-{
-    return uint32_t(PR_Now() / PR_USEC_PER_SEC);
-}
-
-uint32_t nsFtpState::mSessionStartTime = GetFtpTime();
-
 nsresult
 nsFtpState::Init(nsFtpChannel *channel)
 {
     // parameter validation
     NS_ASSERTION(channel, "FTP: needs a channel");
 
     mChannel = channel; // a straight ref ptr to the channel
 
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.h
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef __nsFtpState__h_
-#define __nsFtpState__h_
+#ifndef __nsFtpConnectionThread__h_
+#define __nsFtpConnectionThread__h_
 
 #include "nsBaseContentStream.h"
 
 #include "nsString.h"
 #include "nsCOMPtr.h"
 #include "nsIAsyncInputStream.h"
 #include "nsAutoPtr.h"
 #include "nsITransport.h"
@@ -198,18 +198,16 @@ private:
         // ****** other vars
     nsCOMPtr<nsITransport>        mDataTransport;
     nsCOMPtr<nsIAsyncInputStream> mDataStream;
     nsCOMPtr<nsIRequest>    mUploadRequest;
     bool                    mAddressChecked;
     bool                    mServerIsIPv6;
     bool                    mUseUTF8;
 
-    static uint32_t         mSessionStartTime;
-
     mozilla::net::NetAddr   mServerAddress;
 
     // ***** control read gvars
     nsresult                mControlStatus;
     nsCString               mControlReadCarryOverBuf;
 
     nsCString mSuppliedEntityID;
 
@@ -225,9 +223,9 @@ private:
     nsresult                           SaveNetworkStats(bool);
     void                               CountRecvBytes(uint64_t recvBytes)
     {
         mCountRecv += recvBytes;
         SaveNetworkStats(false);
     }
 };
 
-#endif //__nsFtpState__h_
+#endif //__nsFtpConnectionThread__h_