Closed Bug 1128918 Opened 9 years ago Closed 9 years ago

Store original location in BreakpointActor.

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)

Attached patch patchSplinter Review
BreakpointActors currently store the generated location with which they are associated. In addition, they are stored by original location in the breakpoint store. Since our assumption that BreakpointActors correspond to a single generated location is wrong, it makes more sense to store them in the breakpoint store by generated location.

We can't simply replace the generated location stored in the BreakpointActor with the original location, since doing so would require multiple parts at once. Instead, we are going to proceed in steps. This bug is about the first step, which is about storing the original location in the BreakpointActor as well.
Attachment #8558487 - Flags: review?(jlong)
Comment on attachment 8558487 [details] [diff] [review]
patch

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

Looks good, with a few nits.

::: toolkit/devtools/server/actors/script.js
@@ +2768,5 @@
>     */
> +  _getOrCreateBreakpointActor: function (originalLocation, generatedLocation,
> +                                         condition)
> +  {
> +    let actor = this.breakpointActorMap.getActor(generatedLocation);

Can you update the doc for this function with the new args?

@@ +2883,4 @@
>  
> +    return this.threadActor.sources.getGeneratedLocation(originalLocation)
> +                                   .then(generatedLocation =>
> +    {

style nit: can this go on the same line as the arrow function? that's more consistent with the rest of the code

@@ +4656,5 @@
>   * @param string aCondition
>   *        Optional. A condition which, when false, will cause the breakpoint to
>   *        be skipped.
>   */
> +function BreakpointActor(aThreadActor, aOriginalLocation, aGeneratedLocation, aCondition)

Same here, please update the docs.
Attachment #8558487 - Flags: review?(jlong) → review+
Try run is green, pushed to fx-team:
https://hg.mozilla.org/integration/fx-team/rev/49be6ef4d093
https://hg.mozilla.org/mozilla-central/rev/49be6ef4d093
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: