Closed Bug 645487 Opened 14 years ago Closed 14 years ago

Port Bug 539660 [Remove sessionstore.interval and sessionstore.resume_from_crash default values from nsSessionStore.js]

Categories

(SeaMonkey :: Session Restore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: misak.bugzilla, Assigned: misak.bugzilla)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
From parent bug: Bug 535408 comment 4 doesn't make sense; we couldn't remove it from firefox.js, as getIntPref would throw. Defining JS getters shouldn't create any measurable overhead. Pretty much anything not directly used in init() should be a lazy getter. Defining _interval and _resume_from_crash as lazy getters but not _prefBranch would make them depend on init() being called first, whereas currently they can be accessed before init(). I suppose that shouldn't be a problem in practice, but I'd like to avoid the not-immediately-obvious dependency anyway.
Attachment #522194 - Flags: review?(neil)
Comment on attachment 522194 [details] [diff] [review] patch >+ XPCOMUtils.defineLazyGetter(this, "_prefBranch", function () { >+ return Components.classes["@mozilla.org/preferences-service;1"] >+ .getService(Components.interfaces.nsIPrefService).getBranch("browser.") >+ .QueryInterface(Components.interfaces.nsIPrefBranch2); Why doesn't this use Services.prefs.getBranch("browser.") ? >- this._prefBranch = Services.prefs.getBranch("browser."); >- this._prefBranch.QueryInterface(Components.interfaces.nsIPrefBranch2);
That i tried to fix first, replacing: XPCOMUtils.defineLazyGetter(this, "_prefBranch", function () { return Services.prefs.getBranch("browser.") .QueryInterface(Components.interfaces.nsIPrefBranch2); } and it somehow failed, so i go their way ...
Attached patch v2 (obsolete) — Splinter Review
It seems i made some type in my first try.
Attachment #522194 - Attachment is obsolete: true
Attachment #522194 - Flags: review?(neil)
Attachment #522216 - Flags: review?(neil)
Attached patch correct patcSplinter Review
Sorry, this is the correct one.
Attachment #522216 - Attachment is obsolete: true
Attachment #522216 - Flags: review?(neil)
Attachment #522218 - Flags: review?(neil)
Attachment #522218 - Flags: review?(neil) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: