-
Notifications
You must be signed in to change notification settings - Fork 468
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
cefclient aborted popup keeps application from terminating #3776
Comments
Reproduces for me with M130 on Windows 11. The window closes but processes are still running in Task Manager. |
This does not appear to reproduce with the file open dialogs from https://tests/dialogs |
Looks like cefclient's popup handling is the issue. The problem is avoided by running with It would be useful to test if calling |
I will debug all of these. I plan to upgrade to CEF 129 and this is on the regression list. |
|
In this case the popup is being aborted in WebContentsImpl::CreateNewWindow because the file chooser is active. This causes RenderFrameHostImpl::CreateNewWindow to ignore the popup after the call to CefBrowserInfoManager::CanCreateWindow. |
There are a number of cases where RenderFrameHostImpl::CreateNewWindow may cancel the popup after calling CanCreateWindow. For best results (to catch all cancelations) I think we need to add a callback for those cases. |
Console output looks like:
|
Pass a new |popup_id| parameter to OnBeforePopup and call a new OnBeforePopupAborted callback if the popup is aborted before OnAfterCreated is called for the popup browser. Add new CefBrowserHost::GetBrowserByIdentifier and GetOpenerIdentifier methods to assist with retrieval of associated browsers. In cefclient, clean up state when a popup is aborted and close any associated popup browsers when the opener browser is closed. This also works when running with `--use-default-popup`.
I'm trying to track down a similar thing in our app that only happens when we open a second browser in a popup on Mac OS. The app functions fine until it's time to quit and then hangs at quit time. This happens all the way back down to CEF 127.0.2 beta (switching nothing but the CEF files), and stops the bad behavior at 126.2.4, the final 126 baseline I can find. cefclient with the OP's URL behaves a bit differently than described here on Mac. The version based on CEF 126.2.4 handles everything fine. cefclient on 127.0.2 crashes on cancelling the file dialog. I've had to release a version of our app on the final 127 release to correct the things that aren't working with the alloy-style/chrome-runtime (spell checker on windows, confirm dialogs) but now this behavior is present in 127. Is it felt that the fix here will similarly address this Mac behavior? Or there new things that must be done at the client level as well? EDIT: That might not be totally true: version 126.2.4 of cefclient never actually quits. |
Do you actually mean "hangs" (e.g. unresponsive), or do you mean that it just doesn't exit? If it's not exiting then check why CefQuitMessageLoop is not being called in your case. For example, maybe there's an error in your OnAfterCreated/OnBeforeClose tracking. This issue addresses aborted popups specifically, which doesn't sound like your issue. |
Yes, "hangs" as in unresponsive. Users have to force-quit the app. That behavior happens at 127.0.2 and doesn't at 126.2.4. |
Describe the bug
If FileDialogHandler::OnFileDialog gets invoked, cefclient does not terminate.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
cefclient should close normally.
Screenshots
Not needed
Versions (please complete the following information):
Additional context
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?
cefclient: Yes
cefsimple: No
Does the problem reproduce with Google Chrome at the same version?
No
The text was updated successfully, but these errors were encountered: