Skip to content

Commit faad987

Browse files
committed
This was the real culprit in terms of RAM bloatage.
Fixes: https://trac.torproject.org/projects/tor/ticket/4804 This core preferences management and logging code needs a serious overhall now that I understand extension JS namespaces a bit better...
1 parent e662bc6 commit faad987

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/chrome/content/code/HTTPSRules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function RuleSet(name, match_rule, default_off) {
3636
this.rules = [];
3737
this.exclusions = [];
3838
this.cookierules = [];
39-
this.prefs = HTTPSEverywhere.instance.get_prefs();
39+
this.prefs = HTTPSEverywhere.instance.prefs;
4040
try {
4141
// if this pref exists, use it
4242
this.active = this.prefs.getBoolPref(name);

src/components/https-everywhere.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ function HTTPSEverywhere() {
161161

162162
var prefs = CC["@mozilla.org/preferences-service;1"]
163163
.getService(Components.interfaces.nsIPrefService);
164+
this.prefs = prefs;
164165
var branch = prefs.getBranch("extensions.https_everywhere.");
165166

166167

@@ -228,6 +229,7 @@ const shouldLoadTargets = {
228229
// HTTP redirects) correctly.
229230

230231
HTTPSEverywhere.prototype = {
232+
prefs: null,
231233
// properties required for XPCOM registration:
232234
classDescription: SERVICE_NAME,
233235
classID: SERVICE_ID,

0 commit comments

Comments
 (0)