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)
SeaMonkey
Session Restore
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: misak.bugzilla, Assigned: misak.bugzilla)
References
Details
Attachments
(1 file, 2 obsolete files)
|
3.93 KB,
patch
|
neil
:
review+
|
Details | Diff | 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 1•14 years ago
|
||
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);
| Assignee | ||
Comment 2•14 years ago
|
||
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 ...
| Assignee | ||
Comment 3•14 years ago
|
||
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)
| Assignee | ||
Comment 4•14 years ago
|
||
Sorry, this is the correct one.
Attachment #522216 -
Attachment is obsolete: true
Attachment #522216 -
Flags: review?(neil)
Attachment #522218 -
Flags: review?(neil)
Updated•14 years ago
|
Attachment #522218 -
Flags: review?(neil) → review+
| Assignee | ||
Comment 5•14 years ago
|
||
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.
Description
•