Closed Bug 818224 Opened 7 years ago Closed 7 years ago

Components.utils.reportError from chrome code running in a private window causes error messages to vanish

Categories

(Core :: General, defect)

19 Branch
x86
All
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21
Tracking Status
firefox20 --- fixed

People

(Reporter: jdm, Assigned: ehsan)

References

Details

Attachments

(1 file)

Bug 769298 made errors originating from private windows not show up in the error console. Unfortunately, errors originating from chrome code don't go to the window console, so we need to avoid filtering these out or they are never seen.
OS: Mac OS X → All
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #701380 - Flags: review?(bobbyholley+bmo)
(In reply to Josh Matthews [:jdm] from comment #0)
> Unfortunately, errors originating from chrome code don't go
> to the window console, so we need to avoid filtering these out or they are
> never seen.

I don't understand this part. Can you explain?
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/console/content/consoleBindings.xml#172 makes any script errors from private windows not appear in the global error console. They also don't appear in the per-tab web console AFAIK, which means that they are completely invisible.
Sorry, comment 3 didn't specify tat I was talking about script errors from the chrome context of private windows.
This is noticeable by adding Cu.reportStringError('foo') to some chrome code that will be triggered from both public and private windows, and notice that the messages from private windows never show up.
(In reply to comment #5)
> This is noticeable by adding Cu.reportStringError('foo') to some chrome code
> that will be triggered from both public and private windows, and notice that
> the messages from private windows never show up.

Yeah.  Or by actually causing a script error.  To test this, I added |a.b();| to the end of browser/base/content/browser.js.

My patch simply makes sure that chrome script errors are never marked as coming from a private window.
Attachment #701380 - Flags: review?(bobbyholley+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/59a4df8eb964
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment on attachment 701380 [details] [diff] [review]
Patch (v1)

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 769298
User impact if declined: It would be nice to take this on Aurora since it makes debugging chrome js a bit easier, but it's not really a huge deal...
Testing completed (on m-c, etc.): Locally
Risk to taking this patch (and alternatives if risky): Not risky at all.
String or UUID changes made by this patch: None.
Attachment #701380 - Flags: approval-mozilla-aurora?
Comment on attachment 701380 [details] [diff] [review]
Patch (v1)

If it makes debugging easier, it's early enough in the cycle to take. Approving for Aurora.
Attachment #701380 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Blocks: 841359
You need to log in before you can comment on or make changes to this bug.