mirror of
				https://github.com/lightpanda-io/browser.git
				synced 2025-10-29 23:23:28 +00:00 
			
		
		
		
	Internal navigation should change the CDP loader-id
This is one of the ways that puppeteer knows that navigation happened and is needed to support `waitForNavigation` which compares the existing loader-id with the new one, so it has to change. Also, fix a crash that could happen if CDP disconnects while connections are being aborted.
This commit is contained in:
		| @@ -163,6 +163,11 @@ pub fn pageNavigate(arena: Allocator, bc: anytype, event: *const Notification.Pa | ||||
|     std.debug.assert(bc.session.page != null); | ||||
|  | ||||
|     var cdp = bc.cdp; | ||||
|  | ||||
|     if (event.opts.reason != .address_bar) { | ||||
|         bc.loader_id = bc.cdp.loader_id_gen.next(); | ||||
|     } | ||||
|  | ||||
|     const loader_id = bc.loader_id; | ||||
|     const target_id = bc.target_id orelse unreachable; | ||||
|     const session_id = bc.session_id orelse unreachable; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Karl Seguin
					Karl Seguin