diff --git a/tests/cefclient/browser/root_window_manager.cc b/tests/cefclient/browser/root_window_manager.cc index d5c354da4..db98be798 100644 --- a/tests/cefclient/browser/root_window_manager.cc +++ b/tests/cefclient/browser/root_window_manager.cc @@ -147,8 +147,9 @@ scoped_refptr 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()); } diff --git a/tests/cefclient/browser/temp_window_mac.mm b/tests/cefclient/browser/temp_window_mac.mm index c23044581..ee21c09de 100644 --- a/tests/cefclient/browser/temp_window_mac.mm +++ b/tests/cefclient/browser/temp_window_mac.mm @@ -29,7 +29,7 @@ class TempWindowMacImpl { } ~TempWindowMacImpl() { DCHECK(window_); - [window_ close]; + window_ = nil; } private: