Closed
Bug 698738
Opened 13 years ago
Closed 13 years ago
Use the observer method for idle-daily and formhistory-expire-now in nsFormHistory.js
Categories
(Toolkit :: Form Manager, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: espindola, Assigned: espindola)
References
Details
Attachments
(1 file, 1 obsolete file)
2.21 KB,
patch
|
mak
:
review+
mayhemer
:
feedback+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attachment #570988 -
Flags: review?(mak77)
Attachment #570988 -
Flags: feedback?(honzab.moz)
Comment 2•13 years ago
|
||
Comment on attachment 570988 [details] [diff] [review]
Use the observer method for idle-daily and formhistory-expire-now in nsFormHistory.js
Review of attachment 570988 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/satchel/nsFormHistory.js
@@ +394,2 @@
> else
> this.log("Oops! Unexpected notification: " + topic);
may you please convert this into a switch clause?
![]() |
||
Comment 3•13 years ago
|
||
Comment on attachment 570988 [details] [diff] [review]
Use the observer method for idle-daily and formhistory-expire-now in nsFormHistory.js
Review of attachment 570988 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/satchel/nsFormHistory.js
@@ +139,5 @@
> this.messageManager.addMessageListener("FormHistory:FormSubmitEntries", this);
>
> // Add observers
> + Services.obs.addObserver(this, "idle-daily", false);
> + Services.obs.addObserver(this, "formhistory-expire-now", false);
You may use 'true' (add as a weak ref here) IMO, but let reviewer decide.
@@ +394,2 @@
> else
> this.log("Oops! Unexpected notification: " + topic);
+1
Attachment #570988 -
Flags: feedback?(honzab.moz) → feedback+
![]() |
||
Comment 4•13 years ago
|
||
> You may use 'true' (add as a weak ref here) IMO, but let reviewer decide.
nsFormHistory is used as a service [@mozilla.org/satchel/form-history;1], to support my suggestion.
Comment 5•13 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #3)
> > // Add observers
> > + Services.obs.addObserver(this, "idle-daily", false);
> > + Services.obs.addObserver(this, "formhistory-expire-now", false);
>
> You may use 'true' (add as a weak ref here) IMO, but let reviewer decide.
fwiw, this is happening in another bug (bug 698570 exactly). It's hard to follow on all of these bugs without correct dependencies.
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #570988 -
Attachment is obsolete: true
Attachment #570988 -
Flags: review?(mak77)
Attachment #572029 -
Flags: review?(mak77)
Attachment #572029 -
Flags: feedback?(honzab.moz)
Comment 7•13 years ago
|
||
Comment on attachment 572029 [details] [diff] [review]
Use the observer method for idle-daily and formhistory-expire-now in nsFormHistory.js
Review of attachment 572029 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with these fixed.
The weak references will be handled in the blocked bug.
::: toolkit/components/satchel/nsFormHistory.js
@@ +400,5 @@
> this.updatePrefs();
> + break;
> + case "idle-daily":
> + case "formhistory-expire-now":
> + this.expireOldEntries();
missing break here
@@ +406,1 @@
> this.log("Oops! Unexpected notification: " + topic);
nit: I know it's useless, but I like to have a break in default too, mostly because default doesn't have to be the last option in a switch, so if anyone moves it around, he may miss the break.
Attachment #572029 -
Flags: review?(mak77) → review+
![]() |
||
Comment 8•13 years ago
|
||
Comment on attachment 572029 [details] [diff] [review]
Use the observer method for idle-daily and formhistory-expire-now in nsFormHistory.js
Review of attachment 572029 [details] [diff] [review]:
-----------------------------------------------------------------
f+ and supporting mak's comments.
Attachment #572029 -
Flags: feedback?(honzab.moz) → feedback+
Assignee | ||
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in
before you can comment on or make changes to this bug.
Description
•