Closed
Bug 1508314
Opened 6 years ago
Closed 6 years ago
Stepping should work "normally"
Categories
(Core Graveyard :: Web Replay, enhancement)
Core Graveyard
Web Replay
Tracking
(firefox65 fixed)
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: jlast, Assigned: bhackett1024)
References
Details
Attachments
(3 files)
4.00 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
1.02 KB,
patch
|
jlast
:
review+
|
Details | Diff | Splinter Review |
3.73 KB,
patch
|
loganfsmyth
:
review+
|
Details | Diff | Splinter Review |
We expect that the stepping buttons (resume, step in, step out, step forward) should work the same while replaying as they would work without web-replay.
We also expect that the inverse operations (step back, rewind) should be mirror operations of their counter-parts.
Reporter | ||
Comment 1•6 years ago
|
||
Step out does not pause at parent frame:
STR:
1. go to https://firefox-dev.tools/debugger-examples/examples/todomvc/
2. add a breakpoint at todo-view#33
3. step forward
4. rewind
ER: expect to pause at 33
AR: keep going
STR:
1. go to https://firefox-dev.tools/debugger-examples/examples/todomvc/
2. add a breakpoint at backbone.js#99
3. step in twice
4. step out from pick
ER: be back at 999
AR: at 1003 where View is finished...
Assignee | ||
Comment 2•6 years ago
|
||
The first case is a problem in the navigation code. When searching backwards in the execution space, breakpoint hits are ignored at execution points where temporary checkpoints were previously created. This still needs test coverage, which I'm hoping to add soon.
Assignee: nobody → bhackett1024
Attachment #9026245 -
Flags: review?(continuation)
Assignee | ||
Comment 3•6 years ago
|
||
The second case is a problem in the code for stepping out when replaying which was added recently. We look for step offsets in the parent frame but do so using the source location of the callee frame. This ends up producing offsets that will not be hit after stepping out. (This also needs test coverage.)
Attachment #9026246 -
Flags: review?(jlaster)
Comment 4•6 years ago
|
||
Comment on attachment 9026245 [details] [diff] [review]
Part 1 - Watch for hits at temporary checkpoint locations when searching backwards.
Review of attachment 9026245 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/recordreplay/ipc/ChildNavigation.cpp
@@ +290,5 @@
> void OnRegionEnd();
>
> public:
> // Note: this always rewinds.
> + void Enter(const CheckpointId& aStart, const Maybe<ExecutionPoint>& aEnd, bool aIncludeEnd);
Maybe it makes sense to have a default value of false for aIncludeEnd?
Attachment #9026245 -
Flags: review?(continuation) → review+
Reporter | ||
Comment 5•6 years ago
|
||
Comment on attachment 9026246 [details] [diff] [review]
Part 2 - Use parent frame's location when finding step offsets.
Review of attachment 9026246 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me
Attachment #9026246 -
Flags: review?(jlaster) → review+
Reporter | ||
Comment 6•6 years ago
|
||
I see a couple of things when testing in app-view.js#addOne
I'm stepping into `app.TodoView` stepping out, and then adding breakpoints on different lines in addOne.
1. sometimes I miss a breakpoint
2. sometimes I resume and hit a previous step out location (did we somehow not remove an onPop handler)?
Lastly, maybe un-related but when i click the console jump buttons I go to the right spot but the red line is at the top, which is a bit strange because the progress locations should be good because we're jumping to the right spot.
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #4)
> Comment on attachment 9026245 [details] [diff] [review]
> Part 1 - Watch for hits at temporary checkpoint locations when searching
> backwards.
>
> Review of attachment 9026245 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: toolkit/recordreplay/ipc/ChildNavigation.cpp
> @@ +290,5 @@
> > void OnRegionEnd();
> >
> > public:
> > // Note: this always rewinds.
> > + void Enter(const CheckpointId& aStart, const Maybe<ExecutionPoint>& aEnd, bool aIncludeEnd);
>
> Maybe it makes sense to have a default value of false for aIncludeEnd?
Hmm, I think it would be better to avoid the default value --- I don't think either value for aIncludeEnd has an intrinsic reason to be the common case.
Assignee | ||
Comment 8•6 years ago
|
||
This patch makes sure that onStep and onPop hooks are cleared for all frames when a thread pauses or resumes without stepping.
onStep and onPop hooks have different semantics from the normal Debugger. When setting one of these hooks in a Debugger, they are cleared when the frame is popped, but in the ReplayDebugger case they remain in case the user rewinds to a time where the frame exists. (They are subtly different in other ways related to our inability to uniquely identify frames, in that they will be called for any frame with the same script and depth; these are potentially fixable, but the above issue kind of goes hand in hand with the ability to rewind.)
To make these hooks easier to manage for the thread actor, this patch removes the ability to directly set onStep and onPop hooks to undefined for ReplayDebugger frames, and instead provides a replayClearSteppingHooks method on the debugger itself that clears out these hooks for all frames, including ones not currently on the stack.
Attachment #9026579 -
Flags: review?(lsmyth)
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/436fe5156b0a
Part 1 - Watch for hits at temporary checkpoint locations when searching backwards, r=mccr8.
https://hg.mozilla.org/integration/mozilla-inbound/rev/1d4a0822756a
Part 2 - Use parent frame's location when finding step offsets, r=jlast.
Updated•6 years ago
|
Attachment #9026579 -
Flags: review?(lsmyth) → review+
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/436fe5156b0a
https://hg.mozilla.org/mozilla-central/rev/1d4a0822756a
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 11•6 years ago
|
||
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f668df79d93b
Part 3 - Clear out stepping hooks via ReplayDebugger, r=lsmyth.
Comment 12•6 years ago
|
||
bugherder |
Updated•5 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•