Closed Bug 899812 Opened 6 years ago Closed 6 years ago

Error reporters should consistently report errors to stderr

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: billm, Assigned: billm)

Details

Attachments

(1 file)

I was talking to some frontend people today and it seems like we still have more work to do with the error reporters. Most people develop frontend code with a release build, and our error reporters only print to stderr when DEBUG is defined. However, when chrome code breaks, it's often not possible to get to the browser console to see the error.

I'm a little concerned about printing a lot of spew to stderr in release builds. Maybe we should only do it on nightly. Does this sound reasonable to people?
Thinking about this a little more, we can control this with the same pref that controls dump(). All the frontend people enable that, while normal users are unlikely to do so.

This patch adds some #includes of nsGlobalWindow.h in a few places. If that's too gross, can you suggest a better place to put the definition? I couldn't think of anything.
Assignee: nobody → wmccloskey
Status: NEW → ASSIGNED
Attachment #783441 - Flags: review?(bobbyholley+bmo)
Great idea! This will certainly be useful for front-end debugging.
Comment on attachment 783441 [details] [diff] [review]
error-reporting-with-dump

Review of attachment 783441 [details] [diff] [review]:
-----------------------------------------------------------------

Clever! Let's put this on nsContentUtils. r=bholley with that.
Attachment #783441 - Flags: review?(bobbyholley+bmo) → review+
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
https://hg.mozilla.org/mozilla-central/rev/f775819f6b48
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.