Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.nio.file.Path;
import java.time.*;
import java.util.*;
import java.util.List;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.function.*;
Expand Down Expand Up @@ -62,9 +63,9 @@ class Edge extends WebBrowser {
private static final int MAXIMUM_CREATION_RETRIES = 5;
private static final Duration MAXIMUM_OPERATION_TIME = Duration.ofMillis(Integer.getInteger(WEB_VIEW_OPERATION_TIMEOUT, 5_000));

private record WebViewEnvironment(ICoreWebView2Environment environment, ArrayList<Edge> instances) {
private record WebViewEnvironment(ICoreWebView2Environment environment, List<Edge> instances) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if a record is really useful here. can the instances probably be part of ICoreWebView2Environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ICoreWebView2Environment is a native interface (https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment?view=webview2-1.0.2957.106), so I guess nothing we could (or at least should) extend.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay than its not an option of course ...

public WebViewEnvironment(ICoreWebView2Environment environment) {
this (environment, new ArrayList<>());
this (environment, new CopyOnWriteArrayList<>());
}
}

Expand Down
Loading