Closed
Bug 751813
Opened 13 years ago
Closed 12 years ago
Stop spewing to the console about Places Maintenance
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: philor, Assigned: mak)
References
Details
Attachments
(1 file, 1 obsolete file)
4.58 KB,
patch
|
Paolo
:
review+
|
Details | Diff | Splinter Review |
According to bug 739354 comment 6, we want to promote the antipattern of polling the console and assuming that nothing but your test will be writing to it, so we need to stop putting anything in there about Places Maintenance, so that tests which do that can fail when other things get written in there instead.
Assignee | ||
Comment 1•13 years ago
|
||
Yeah, I'm fine with that, as I expressed in https://bugzilla.mozilla.org/show_bug.cgi?id=739354#c5, I actually forgot that bug was still open.
Assignee | ||
Comment 2•13 years ago
|
||
I suppose it'll take less time if I directly do that.
Assignee: nobody → mak77
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #626813 -
Flags: review?(paolo.mozmail)
Comment 4•12 years ago
|
||
Comment on attachment 626813 [details] [diff] [review]
patch v1.0
>+++ b/toolkit/components/places/PlacesCategoriesStarter.js
>@@ -79,17 +79,20 @@ PlacesCategoriesStarter.prototype = {
>- PlacesDBUtils.maintenanceOnIdle();
>+ PlacesDBUtils.maintenanceOnIdle(function () {
>+ // Empty callback used to to eat the log and thus avoid sending it
>+ // to the console.
>+ });
It looks like this is the only place where maintenanceOnIdle is called, apart from test code:
http://mxr.mozilla.org/mozilla-central/search?string=maintenanceOnIdle
What do you think about removing the "else" part inside maintenanceOnIdle that writes to the console when the callback is null, and just using a callback that writes to the console (or do_log_info or something) in tests that really require it? I doubt that any add-on depends on the behavior of writing to the console when the callback is null.
Attachment #626813 -
Flags: review?(paolo.mozmail)
Comment 5•12 years ago
|
||
(In reply to Paolo Amadini [:paolo] from comment #4)
> What do you think about removing the "else" part inside maintenanceOnIdle
I meant _executeTasks:
http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/components/places/PlacesDBUtils.jsm#69
I cannot find any caller of checkAndFixDatabase, also.
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Paolo Amadini [:paolo] from comment #4)
> What do you think about removing the "else" part inside maintenanceOnIdle
> that writes to the console when the callback is null, and just using a
> callback that writes to the console
Hm yeah that may also be a possibility, will check add-ons on mxr.
Assignee | ||
Comment 7•12 years ago
|
||
ok, the change makes sense, no interesting results from add-ons mxr.
Attachment #626813 -
Attachment is obsolete: true
Attachment #629788 -
Flags: review?(paolo.mozmail)
Comment 8•12 years ago
|
||
Comment on attachment 629788 [details] [diff] [review]
patch v1.1
Looks good!
Attachment #629788 -
Flags: review?(paolo.mozmail) → review+
Assignee | ||
Comment 9•12 years ago
|
||
looks like I never pushed this, will do.
Assignee | ||
Comment 10•12 years ago
|
||
Flags: in-testsuite-
Target Milestone: --- → mozilla18
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•