Closed Bug 1131609 Opened 9 years ago Closed 9 years ago

getOriginalLocation should take a sourceActor.

Categories

(DevTools :: Debugger, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox38 fixed)

RESOLVED FIXED
Firefox 38
Tracking Status
firefox38 --- fixed

People

(Reporter: ejpbruel, Assigned: ejpbruel)

Details

Attachments

(1 file)

I've long been annoyed by the fact that getGeneratedLocation and getOriginalLocation are not homogeneous. The former takes a location object with a sourceActor, the latter a location object with a Debugger.source instance. This discrepancy is needlessly confusing in my opinion.

The main reason why getOriginalLocation takes a Debugger.Source instance seems to because that is what getFrameLocation returns. It shouldn't be too hard to refactor getFrameLocation so that it returns the source actor corresponding to the Debugger.Source instance by wrapping it in a call to createNonSourceMappedActor.
Attached patch patchSplinter Review
Assignee: nobody → ejpbruel
Attachment #8562111 - Flags: review?(jlong)
Comment on attachment 8562111 [details] [diff] [review]
patch

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

This should be pretty harmless. Only reason it wasn't like this was because we almost always already had a `Debugger.Source` object, but you're right to make it more consistent.
Attachment #8562111 - Flags: review?(jlong) → review+
The previous try run was bogus. Here's the second attempt:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9c3e6dc26975
Try run looks green, posted to fx-team:
https://hg.mozilla.org/integration/fx-team/rev/7462142c1322
https://hg.mozilla.org/mozilla-central/rev/7462142c1322
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: