mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
cdp: return error in case of missing event's frame
Instead of using the root_frame
This commit is contained in:
@@ -645,7 +645,7 @@ pub fn frameNavigated(arena: Allocator, bc: *CDP.BrowserContext, event: *const N
|
||||
// frame's JS context for inspector.contextCreated prevents re-registering
|
||||
// the root context under a new id (which silently invalidates the
|
||||
// previous id on the V8 side).
|
||||
const frame = bc.session.findFrameByFrameId(event.frame_id) orelse root_frame;
|
||||
const frame = bc.session.findFrameByFrameId(event.frame_id) orelse return error.FrameNotFound;
|
||||
|
||||
// frameNavigated event
|
||||
try cdp.sendEvent("Page.frameNavigated", .{
|
||||
|
||||
Reference in New Issue
Block a user