-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Edge instances in different displays #1013 #1018
Support Edge instances in different displays #1013 #1018
Conversation
329bae4
to
1ee38dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @HeikoKlare
I suggest to merge this also today, so that we have test all your fixes in tomorrows I-build
1ee38dd
to
52a73be
Compare
Sure, just note that "test" precisely means "manual test" because there are currently only three tests executed against the Edge browser (since I did not manage to make #672 running successfully yet). I made slight changes after your review, in 52a73be. They concern the following:
There is one thing to consider left: the logic for clearing cookies (provided statically via |
The current implementation of the Edge browser creates a WebView2Environment on first creation of an WebView2 / Edge browser instance. On every further creation of a WebView2 instance, this environment is used. In case the WebView2 instance is created for a different display, i.e., within a different thread, the instantiation fails as the WebView2Environment has been created in a different thread. To support the creation of WebView2 instances in different displays, this change replaces the static WebView2Environment with one environment for every display. The WebView2 instances are created for the environment belonging to the display for which the current instantiation is requested. An according regression test is added. Contributes to eclipse-platform#1013
52a73be
to
82d080b
Compare
Thank you @HeikoKlare Looking forward to test your changes tomorrow, but with the edge data dir set it is already very stable for us. |
The current implementation of the Edge browser creates a WebView2Environment on first creation of an WebView2 / Edge browser instance. On every further creation of a WebView2 instance, this environment is used. In case the WebView2 instance is created for a different display, i.e., within a different thread, the instantiation fails as the WebView2Environment has been created in a different thread.
To support the creation of WebView2 instances in different displays, this change replaces the static WebView2Environment with one environment for every display. The WebView2 instances are created for the environment belonging to the display for which the current instantiation is requested. An according regression test is added.
Contributes to #1013
A documentation for using multiple WebView2 environments can be found here: https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/process-model?tabs=csharp#multiple-environment-objects