Skip to content

Commit 09e15a9

Browse files
committed
Temporarily revert "Make some trivial changes to reduce RAM consumption"
This reverts commit e662bc6. Temporarily revert "This was the real culprit in terms of RAM bloatage." This reverts commit faad987. Conflicts: src/components/https-everywhere.js
1 parent ff4ebd5 commit 09e15a9

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/chrome/content/code/HTTPSRules.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function Rule(from, to) {
2-
//this.from = from;
3-
//this.to = to;
2+
this.from = from;
3+
this.to = to;
44
this.from_c = new RegExp(from);
55
}
66

77
function Exclusion(pattern) {
8-
//this.pattern = pattern;
8+
this.pattern = pattern;
99
this.pattern_c = new RegExp(pattern);
1010
}
1111

@@ -18,11 +18,11 @@ function CookieRule(host, cookiename) {
1818

1919
ruleset_counter = 0;
2020
function RuleSet(name, match_rule, default_off) {
21-
this.id="httpseR" + ruleset_counter;
21+
this.id="https-everywhere-rule-" + ruleset_counter;
2222
ruleset_counter += 1;
2323
this.on_by_default = true;
2424
this.name = name;
25-
//this.ruleset_match = match_rule;
25+
this.ruleset_match = match_rule;
2626
this.notes = "";
2727
if (match_rule) this.ruleset_match_c = new RegExp(match_rule)
2828
else this.ruleset_match_c = null;
@@ -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.prefs;
39+
this.prefs = HTTPSEverywhere.instance.get_prefs();
4040
try {
4141
// if this pref exists, use it
4242
this.active = this.prefs.getBoolPref(name);

src/components/https-everywhere.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ function HTTPSEverywhere() {
160160
this.ApplicableList = ApplicableList;
161161

162162
this.prefs = this.get_prefs();
163+
var prefs = CC["@mozilla.org/preferences-service;1"]
164+
.getService(Components.interfaces.nsIPrefService);
165+
var branch = prefs.getBranch("extensions.https_everywhere.");
166+
163167

164168
// We need to use observers instead of categories for FF3.0 for these:
165169
// https://developer.mozilla.org/en/Observer_Notifications
@@ -225,7 +229,6 @@ const shouldLoadTargets = {
225229
// HTTP redirects) correctly.
226230

227231
HTTPSEverywhere.prototype = {
228-
prefs: null,
229232
// properties required for XPCOM registration:
230233
classDescription: SERVICE_NAME,
231234
classID: SERVICE_ID,

0 commit comments

Comments
 (0)