Closed Bug 901098 Opened 6 years ago Closed 6 years ago

Trace actor "callsite" trace type actually returns source location

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: rjacob, Assigned: rjacob)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

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: nobody → rbailey
Blocks: 887024
Attached patch Patch (obsolete) — Splinter Review
Attachment #785182 - Flags: review?(nfitzgerald)
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)
Attached patch PatchSplinter Review
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/mozilla-central/rev/290389a3cbe7
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.