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
f6393726b4
commit
239742e877
|
@ -147,8 +147,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