Skip to content

Commit

Permalink
Bug 1847402 - Remove some unused code: NS_N(), MAX_RECURSION_COUNT, a…
Browse files Browse the repository at this point in the history
…nd AutoIncrement. r=necko-reviewers,jesup

NS_N() was added in bug 49786 in 2001 (!!). MAX_RECURSION_COUNT and AutoIncrement were added in bug 371473 in 2007.

Differential Revision: https://phabricator.services.mozilla.com/D185508
  • Loading branch information
cpeterso committed Aug 7, 2023
1 parent 678cb12 commit f335895
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions netwerk/base/nsIOService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ using mozilla::dom::ServiceWorkerDescriptor;
#define NETWORK_DNS_PREF "network.dns."
#define FORCE_EXTERNAL_PREF_PREFIX "network.protocol-handler.external."

#define MAX_RECURSION_COUNT 50

nsIOService* gIOService;
static bool gHasWarnedUploadChannel2;
static bool gCaptivePortalEnabled = false;
Expand Down Expand Up @@ -988,15 +986,6 @@ nsIOService::GetDefaultPort(const char* scheme, int32_t* defaultPort) {
return NS_OK;
}

class AutoIncrement {
public:
explicit AutoIncrement(uint32_t* var) : mVar(var) { ++*var; }
~AutoIncrement() { --*mVar; }

private:
uint32_t* mVar;
};

nsresult nsIOService::NewURI(const nsACString& aSpec, const char* aCharset,
nsIURI* aBaseURI, nsIURI** result) {
return NS_NewURI(result, aSpec, aCharset, aBaseURI);
Expand Down
2 changes: 0 additions & 2 deletions netwerk/base/nsIOService.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include "nsWeakReference.h"
#include "nsNetCID.h"

#define NS_N(x) (sizeof(x) / sizeof(*(x)))

// We don't want to expose this observer topic.
// Intended internal use only for remoting offline/inline events.
// See Bug 552829
Expand Down

0 comments on commit f335895

Please sign in to comment.