If we receive an updated frame ensure we reset cur
if required.
Prior to this change `cur` can be stale, meaning the frame returned for `WaitFrame(ctxt, cdptypes.EmptyFrameID)` will be out of date, and never updated based on incoming events.
This commit is contained in:
parent
622bb2ac33
commit
68bf958ce3
|
@ -524,6 +524,9 @@ func (h *TargetHandler) pageEvent(ctxt context.Context, ev interface{}) {
|
||||||
case *page.EventFrameNavigated:
|
case *page.EventFrameNavigated:
|
||||||
h.Lock()
|
h.Lock()
|
||||||
h.frames[e.Frame.ID] = e.Frame
|
h.frames[e.Frame.ID] = e.Frame
|
||||||
|
if h.cur != nil && h.cur.ID == e.Frame.ID {
|
||||||
|
h.cur = e.Frame
|
||||||
|
}
|
||||||
h.Unlock()
|
h.Unlock()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user