Add column number to ConsoleEvent, ConsoleStackEntry, nsIStackFrame

RESOLVED FIXED in mozilla35

Status

()

RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: erahm, Assigned: erahm)

Tracking

Trunk
mozilla35
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

In bug 1060161 we started printing out stack traces with console messages on b2g devices. It was noted that having a column number in addition to a line number would be useful (particularly for minified code).

My proposal is:
   #1 - add an |unsigned long columnNumber| to ConsoleEvent [1] and
        ConsoleStackEntry [2]
   #2 - add a |readonly attribute int32_t columnNumber| to nsIStackFrame [3]
   #3 - |StackFrameToStackEntry| [4] would set ConsoleStackEntry's column number
   #4 - add a |GetColumnNumber| to JSStackFrame [5] that queries "column" value
        of the JS stack object

[1] http://hg.mozilla.org/mozilla-central/annotate/426497473505/dom/webidl/Console.webidl#l35
[2] http://hg.mozilla.org/mozilla-central/annotate/426497473505/dom/webidl/Console.webidl#l67
[3] http://hg.mozilla.org/mozilla-central/annotate/426497473505/xpcom/base/nsIException.idl#l14
[4] http://hg.mozilla.org/mozilla-central/annotate/426497473505/dom/base/Console.cpp#l752
[5] http://hg.mozilla.org/mozilla-central/annotate/426497473505/dom/bindings/Exceptions.cpp#l264
Created attachment 8491925 [details] [diff] [review]
Part 1: Add columnNumber to ConsoleEvent and ConsoleStackEntry
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Created attachment 8491928 [details] [diff] [review]
Part 2: Add columnNumber to nsIStackFrame and set in JSStackFrame
Created attachment 8491929 [details] [diff] [review]
Part 3: Set columnNumber when processing console messages
Attachment #8491925 - Flags: review?(bzbarsky)
Attachment #8491928 - Flags: review?(bzbarsky)
Attachment #8491929 - Flags: review?(bzbarsky)
Comment on attachment 8491925 [details] [diff] [review]
Part 1: Add columnNumber to ConsoleEvent and ConsoleStackEntry

r=me
Attachment #8491925 - Flags: review?(bzbarsky) → review+
Comment on attachment 8491928 [details] [diff] [review]
Part 2: Add columnNumber to nsIStackFrame and set in JSStackFrame

r=me
Attachment #8491928 - Flags: review?(bzbarsky) → review+
Comment on attachment 8491929 [details] [diff] [review]
Part 3: Set columnNumber when processing console messages

r=me.  Thank you for breaking this up into nice easy to digest chunks!
Attachment #8491929 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #6)
> Comment on attachment 8491929 [details] [diff] [review]
> Part 3: Set columnNumber when processing console messages
> 
> r=me.  Thank you for breaking this up into nice easy to digest chunks!

Thanks for the quick reviews! Try is running, I expect that I'll need to fix a few tests when the results come in: https://tbpl.mozilla.org/?tree=Try&rev=d965bae7a732
Created attachment 8492489 [details] [diff] [review]
Part 4: Update tests

Rob, can you take a look at these test updates that handle the new |columnNumber| field on stack traces?
Attachment #8492489 - Flags: review?(rcampbell)
Comment on attachment 8492489 [details] [diff] [review]
Part 4: Update tests

Reassigning since Rob is out.
Attachment #8492489 - Flags: review?(rcampbell) → review?(past)
Attachment #8492489 - Flags: review?(past) → review+
Duplicate of this bug: 684102
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.