Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of Unused Functions #233

Closed
msxfm opened this issue Jul 7, 2014 · 3 comments
Closed

Removal of Unused Functions #233

msxfm opened this issue Jul 7, 2014 · 3 comments

Comments

@msxfm
Copy link

msxfm commented Jul 7, 2014

Issue by jsamuel
Thursday Dec 22, 2011 at 19:01 GMT
Originally opened as RequestPolicy/requestpolicy#233


imported trac ticket
created: 2011-06-17 23:11:40
reporter: eibwen

There appear to be at least 12 (!) functions that are not currently used. Recommend removal of these functions:

''./src/components/requestpolicyService.js''

  _combinedOriginToDestinationIdentifierHasOrigin
  _combinedOriginToDestinationIdentifierHasDestination
  _dumpRejectedRequests
  _dumpAllowedRequests

''./src/content/menu.js''

  _removeExtraSubmenuSeparators
  _disableMenuIfEmpty

''./src/content/overlay.js''

  _contextMenuOnPopupHidden
  _performRedirect

''./src/modules/DomainUtil.jsm:''

  identifierIsInUri
  stripWww
  sameHostIgnoreWww
  destinationIsSubdomainOfOrigin

Note that there are additional functions that are not referenced in the extension; however, they are implied to be required by the IDL of an XPCOM component/observer or similar.

@msxfm
Copy link
Author

msxfm commented Jul 7, 2014

Comment by jsamuel
Thursday Dec 22, 2011 at 19:01 GMT


imported trac comment
created: 2011-06-18 15:08:50
author: eibwen

More unused functions:

''./src/components/requestpolicyService.js''

  _printAllowedRequests
  _printRejectedRequests
  _dumpRequestTrackingObject

Running total: '''15''' unused functions!
Granted, the last one was used, but only by functions that were themselves unused...

@myrdd
Copy link
Member

myrdd commented Nov 21, 2014

Functions still existing and still unused:

in ''./src/content/overlay.js'':
    _contextMenuOnPopupHidden

in ''./src/modules/DomainUtil.jsm":
    identifierIsInUri
    stripWww
    sameHostIgnoreWww
    destinationIsSubdomainOfOrigin

in ''./src/modules/RequestProcessor.jsm'':
    _printAllowedRequests
    _printRejectedRequests

imho those functions can be removed without any problem, they are obsolete.

@myrdd myrdd added this to the 1.0.beta9 milestone Dec 6, 2014
myrdd added a commit that referenced this issue Mar 19, 2015
@myrdd
Copy link
Member

myrdd commented Mar 19, 2015

cb7367d

@myrdd myrdd closed this as completed Mar 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants