webdriver: Port WebDriverLoadStatus to Generic Channel (#38915)

Ports the channel for WebDriverLoadStatus to GenericChannel.

Testing: No functional changes - Covered by existing webdriver tests
Part of #38912

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-08-25 20:11:03 +02:00 committed by GitHub
parent 4a19f66c31
commit ebf8a35c84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 26 deletions

View file

@ -326,7 +326,7 @@ pub(crate) struct Window {
/// A channel to notify webdriver if there is a navigation
#[no_trace]
webdriver_load_status_sender: RefCell<Option<IpcSender<WebDriverLoadStatus>>>,
webdriver_load_status_sender: RefCell<Option<GenericSender<WebDriverLoadStatus>>>,
/// The current state of the window object
current_state: Cell<WindowState>,
@ -2863,7 +2863,7 @@ impl Window {
pub(crate) fn set_webdriver_load_status_sender(
&self,
sender: Option<IpcSender<WebDriverLoadStatus>>,
sender: Option<GenericSender<WebDriverLoadStatus>>,
) {
*self.webdriver_load_status_sender.borrow_mut() = sender;
}

View file

@ -6,6 +6,7 @@ use std::collections::{HashMap, HashSet};
use std::ffi::CString;
use std::ptr::NonNull;
use base::generic_channel::GenericSender;
use base::id::{BrowsingContextId, PipelineId};
use cookie::Cookie;
use embedder_traits::{
@ -2066,7 +2067,7 @@ pub(crate) fn handle_is_selected(
pub(crate) fn handle_add_load_status_sender(
documents: &DocumentCollection,
pipeline: PipelineId,
reply: IpcSender<WebDriverLoadStatus>,
reply: GenericSender<WebDriverLoadStatus>,
) {
if let Some(document) = documents.find_document(pipeline) {
let window = document.window();