Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Software Freedom Conservancy (SFC)
Copyright 2026 Software Freedom Conservancy (SFC)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Copyright 2011-2025 Software Freedom Conservancy
Copyright 2011-2026 Software Freedom Conservancy
Copyright 2004-2011 Selenium committers
36 changes: 22 additions & 14 deletions dotnet/src/webdriver/BiDi/WebSocketTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

namespace OpenQA.Selenium.BiDi;

class WebSocketTransport(Uri _uri) : ITransport, IDisposable
sealed class WebSocketTransport(Uri _uri) : ITransport, IDisposable
{
private readonly static ILogger _logger = Internal.Logging.Log.GetLogger<WebSocketTransport>();

private readonly ClientWebSocket _webSocket = new();
private readonly byte[] _receiveBuffer = ArrayPool<byte>.Shared.Rent(1024 * 8);
private byte[] _receiveBuffer = ArrayPool<byte>.Shared.Rent(1024 * 8);

private readonly SemaphoreSlim _socketSendSemaphoreSlim = new(1, 1);
private readonly MemoryStream _sharedMemoryStream = new();
Expand Down Expand Up @@ -92,28 +92,36 @@ public async Task SendAsync(byte[] data, CancellationToken cancellationToken)

public void Dispose()
{
if (_disposed)
{
return;
}

_webSocket.Dispose();
_sharedMemoryStream.Dispose();
_socketSendSemaphoreSlim.Dispose();
ReleaseBuffer();
_disposed = true;
Dispose(true);
GC.SuppressFinalize(this);
}

~WebSocketTransport()
{
ReleaseBuffer();
Dispose(false);
}

private void ReleaseBuffer()
private void Dispose(bool disposing)
{
if (_disposed)
{
return;
}

if (disposing)
{
_webSocket.Dispose();
_sharedMemoryStream.Dispose();
_socketSendSemaphoreSlim.Dispose();
}

if (_receiveBuffer is not null)
{
ArrayPool<byte>.Shared.Return(_receiveBuffer);

_receiveBuffer = null!;
}

_disposed = true;
}
}
2 changes: 1 addition & 1 deletion py/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

# General information about the project.
project = "Selenium"
copyright = "2009-2025 Software Freedom Conservancy"
copyright = "Copyright 2004-2011 Selenium committers, 2011-2026 Software Freedom Conservancy"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 6 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ pub trait SeleniumManager {

fn discover_local_browser(&mut self) -> Result<(), Error> {
let mut download_browser = self.is_force_browser_download();
if download_browser && self.is_safari() {
self.get_logger().debug(
"Force browser download requested for Safari, but downloads are not supported; using local discovery",
);
download_browser = false;
}
if !download_browser && !self.is_electron() {
let major_browser_version = self.get_major_browser_version();
match self.discover_browser_version()? {
Expand Down
Loading