Closed Bug 344279 Opened 18 years ago Closed 18 years ago

FeedWriter dumps error messages to the console

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect)

2.0 Branch
x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 2 beta2

People

(Reporter: ispiked, Assigned: jminta)

References

()

Details

(Keywords: fixed1.8.1, Whiteboard: [mustfix])

Attachments

(1 file)

As of now, the LOG function directly dumps stuff to the console. We need to do something like Gavin did in nsSearchService. See also bug 343080 (microsummaries equivalent of this).
Flags: blocking-firefox2?
Ben, can you take care of this?
Assignee: nobody → bugs
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → Firefox 2 beta2
Whiteboard: [mustfix]
Patch makes the LOG function check whether feeds.log is set to true.  If the pref is unset (as in a normal profile), or set to false, then we don't dump anything.  Those wishing to debug can set the pref to true.
Assignee: bugs → jminta
Status: NEW → ASSIGNED
Attachment #229844 - Flags: review?(bugs)
Whiteboard: [mustfix] → [mustfix][needs review ben]
Comment on attachment 229844 [details] [diff] [review]
check feeds.log pref

>Index: browser/components/feeds/src/FeedWriter.js
> function LOG(str) {
>-  dump("*** " + str + "\n");
>+  var prefB = Cc["@mozilla.org/preferences-service;1"].
>+              getService(Ci.nsIPrefBranch);

Style for this file dictates:

var prefB = 
    Cc["contract-id"].
    getService(Ci...);

>+  var shouldLog = false;
>+  try {
>+    shouldLog = prefB.getBoolPref("feeds.log");
>+  } catch (ex) {}

and

try { 
 //..
}
catch (e) {
}

r=ben@mozilla.org with those nits picked.
Attachment #229844 - Flags: review?(bugs) → review+
*** Bug 344592 has been marked as a duplicate of this bug. ***
Landed on trunk.
Checking in browser/components/feeds/src/FeedWriter.js;
/cvsroot/mozilla/browser/components/feeds/src/FeedWriter.js,v  <--  FeedWriter.js
new revision: 1.4; previous revision: 1.3
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [mustfix][needs review ben] → [mustfix]
(In reply to comment #6)
> cause this ?
> http://forums.mozillazine.org/viewtopic.php?p=2383959#2383959
> 
I *highly* doubt it.  If someone has reason to believe this checkin caused this regression, I'd like to hear it, but please don't blindly speculate.  This checkin didn't touch anything in the actual FeedWriter object.
Comment on attachment 229844 [details] [diff] [review]
check feeds.log pref

Requesting 1.8.1 approval.  This is a minimal change, using code that has been tested in a variety of components.  It fixes a significant bug in a new feature.  Testcase is to view any feedpage, for instance the one linked from planet.mozilla.org.
Attachment #229844 - Flags: approval1.8.1?
Comment on attachment 229844 [details] [diff] [review]
check feeds.log pref

a=drivers. Please go ahead and land this on the MOZILLA_1_8_BRANCH.
Attachment #229844 - Flags: approval1.8.1? → approval1.8.1+
Landed on branch
Checking in browser/components/feeds/src/FeedWriter.js;
/cvsroot/mozilla/browser/components/feeds/src/FeedWriter.js,v  <--  FeedWriter.js
new revision: 1.2.2.6; previous revision: 1.2.2.5
done
Keywords: fixed1.8.1
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: