Closed
Bug 1200484
Opened 10 years ago
Closed 10 years ago
Expose JS code's column numbers and use them in more places
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox43 | --- | affected |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(12 files, 1 obsolete file)
|
2.82 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
|
2.62 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
8.42 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
|
2.65 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
1.76 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
3.36 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
|
1.08 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
|
16.88 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
|
9.18 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
|
6.87 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
|
1.65 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
|
1.74 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
JS::DescribeScriptedCaller() can easily provide a column number as well as a line number. And the column number can be bubbled up in various places to where we currently use a 0 for the column number, or where we don't provide a column number but one would be useful.
(I came across this while doing some ad hoc instrumentation of JS timers, where I need the column number in order to be able to understand profiling of minified code. I.e. it's prompted by a real-world use case.)
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8655233 -
Flags: review?(luke)
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8655234 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8655235 -
Flags: review?(amarchesini)
| Assignee | ||
Comment 4•10 years ago
|
||
The patch also makes the filename optional, to match the column, and to make
GetCallingLocation() more similar to JS::DescribeScriptedCaller().
Attachment #8655236 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8655237 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8655240 -
Flags: review?(wmccloskey)
| Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8655241 -
Flags: review?(khuey)
| Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8655242 -
Flags: review?(khuey)
| Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8655244 -
Flags: review?(khuey)
| Assignee | ||
Comment 10•10 years ago
|
||
Because we currently set the source location of a nsJSScriptTimeoutHandler when
initializing from an expression, but not when initializing from a function,
which is an undesirable inconsistency. This requires plumbing through the
JSContext in a few places.
Attachment #8655245 -
Flags: review?(peterv)
| Assignee | ||
Comment 11•10 years ago
|
||
Attachment #8655246 -
Flags: review?(peterv)
| Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8655247 -
Flags: review?(wmccloskey)
| Assignee | ||
Updated•10 years ago
|
Attachment #8655240 -
Attachment is obsolete: true
Attachment #8655240 -
Flags: review?(wmccloskey)
| Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8655248 -
Flags: review?(wmccloskey)
Comment 14•10 years ago
|
||
Comment on attachment 8655235 [details] [diff] [review]
(part 3) - Use JS column numbers in WebSocket.cpp
Review of attachment 8655235 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/WebSocket.cpp
@@ +1090,5 @@
> MOZ_ASSERT(NS_IsMainThread());
> MOZ_ASSERT(aTopLevelWorkerPrivate && !aTopLevelWorkerPrivate->GetWindow());
>
> mImpl->Init(nullptr, aTopLevelWorkerPrivate->GetPrincipal(), mURL,
> + mProtocolArray, mScriptFile, mScriptLine, mScriptColumn, mRv,
80chars
Attachment #8655235 -
Flags: review?(amarchesini) → review+
Updated•10 years ago
|
Attachment #8655233 -
Flags: review?(luke) → review+
Attachment #8655242 -
Flags: review?(khuey) → review+
Attachment #8655241 -
Flags: review?(khuey) → review+
Attachment #8655244 -
Flags: review?(khuey) → review+
Updated•10 years ago
|
Attachment #8655234 -
Flags: review?(mrbkap) → review+
Updated•10 years ago
|
Attachment #8655236 -
Flags: review?(mrbkap) → review+
Updated•10 years ago
|
Attachment #8655237 -
Flags: review?(mrbkap) → review+
Attachment #8655248 -
Flags: review?(wmccloskey) → review+
Attachment #8655247 -
Flags: review?(wmccloskey) → review+
| Assignee | ||
Comment 15•10 years ago
|
||
> > mImpl->Init(nullptr, aTopLevelWorkerPrivate->GetPrincipal(), mURL,
> > + mProtocolArray, mScriptFile, mScriptLine, mScriptColumn, mRv,
>
> 80chars
It's 77.
Comment 16•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa569d3c9c0c
https://hg.mozilla.org/integration/mozilla-inbound/rev/87b184107bb0
https://hg.mozilla.org/integration/mozilla-inbound/rev/1842e6a850a5
https://hg.mozilla.org/integration/mozilla-inbound/rev/e69ce64116c9
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b1b725f1f1d
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab12904f4689
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b6d99eaee3f
https://hg.mozilla.org/integration/mozilla-inbound/rev/4011cb8cbcae
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff59d437f225
https://hg.mozilla.org/integration/mozilla-inbound/rev/82aade52497a
| Assignee | ||
Comment 17•10 years ago
|
||
I landed parts 1--10. Parts 11 and 12 are still awaiting review.
Keywords: leave-open
Comment 18•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aa569d3c9c0c
https://hg.mozilla.org/mozilla-central/rev/87b184107bb0
https://hg.mozilla.org/mozilla-central/rev/1842e6a850a5
https://hg.mozilla.org/mozilla-central/rev/e69ce64116c9
https://hg.mozilla.org/mozilla-central/rev/7b1b725f1f1d
https://hg.mozilla.org/mozilla-central/rev/ab12904f4689
https://hg.mozilla.org/mozilla-central/rev/0b6d99eaee3f
https://hg.mozilla.org/mozilla-central/rev/4011cb8cbcae
https://hg.mozilla.org/mozilla-central/rev/ff59d437f225
https://hg.mozilla.org/mozilla-central/rev/82aade52497a
Updated•10 years ago
|
Attachment #8655245 -
Flags: review?(peterv) → review+
Updated•10 years ago
|
Attachment #8655246 -
Flags: review?(peterv) → review+
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•