The default bug view has changed. See this FAQ.

Trace actor "callsite" trace type actually returns source location

RESOLVED FIXED in Firefox 25

Status

()

Firefox
Developer Tools
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Jake Bailey, Assigned: Jake Bailey)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 25
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

9.40 KB, patch
fitzgen
: review+
Details | Diff | Splinter Review
(Assignee)

Description

4 years ago
The trace actor has a "callsite" trace type, but it returns the current position in execution, i.e. the first character of the executing function. There should be a separate "location" trace type for source location, and "callsite" should return the actual call site of the executing function.
(Assignee)

Updated

4 years ago
Assignee: nobody → rbailey
Blocks: 887024
(Assignee)

Comment 1

4 years ago
Created attachment 785182 [details] [diff] [review]
Patch
Attachment #785182 - Flags: review?(nfitzgerald)
(Assignee)

Comment 2

4 years ago
Try push: https://tbpl.mozilla.org/?tree=Try&rev=1dbf0a1bc93c
Comment on attachment 785182 [details] [diff] [review]
Patch

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

Can you file a follow up to use Debugger.Script.prototype.startLine and Debugger.Script.prototype.startColumn (which doesn't exist yet, so file a bug for it please) instead of the line/col of the frame?

::: toolkit/devtools/server/tests/unit/test_trace_actor-05.js
@@ +85,5 @@
> +      do_check_eq(typeof packets[1].callsite.column, "number",
> +                  'anonymous function callsite should have column');
> +      do_check_true(!isNaN(packets[1].callsite.column),
> +                    'anonymous function callsite column should be a number');
> +

Can we do better than just checking that line and column are numbers? Can we actually check that these things are the callsite vs definition location so that we don't repeat this regression?
Attachment #785182 - Flags: review?(nfitzgerald)
(Assignee)

Comment 4

4 years ago
Created attachment 785270 [details] [diff] [review]
Patch
Attachment #785182 - Attachment is obsolete: true
Attachment #785270 - Flags: review?(nfitzgerald)
Attachment #785270 - Flags: review?(nfitzgerald) → review+
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/290389a3cbe7
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/290389a3cbe7
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.