mac: cefclient: Fix zombie NSWindow object on exit (fixes #3602)
- Don't create a TempWindow when using Views. - Don't call `close` on an NSWindow that is never opened.
This commit is contained in:
parent
02ea88f79f
commit
8f4a47479c
|
@ -141,8 +141,9 @@ scoped_refptr<RootWindow> RootWindowManager::CreateRootWindowAsPopup(
|
|||
|
||||
SanityCheckWindowConfig(is_devtools, use_views, use_alloy_style, with_osr);
|
||||
|
||||
if (!temp_window_) {
|
||||
// TempWindow must be created on the UI thread.
|
||||
if (!temp_window_ && !use_views) {
|
||||
// TempWindow must be created on the UI thread. It is only used with
|
||||
// native (non-Views) parent windows.
|
||||
temp_window_.reset(new TempWindow());
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class TempWindowMacImpl {
|
|||
}
|
||||
~TempWindowMacImpl() {
|
||||
DCHECK(window_);
|
||||
[window_ close];
|
||||
window_ = nil;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue