closing child browser

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

closing child browser

Postby yonatan » Fri Aug 15, 2014 9:12 am

hi

We are upgrading to CEF3 for Avast antivirus.
We are running CEF in single-threaded-message loop, and having crushes when closing windows containing CEF child browser.
Could you please advise what is the popper way to close the child browser?

The parent of the browser is a MFC CWnd child, it is closed by CWnd::DestroyWindow().
We then delete the parent CWnd on WM_DESTROY

We release the reference to the browser :

void CefWindow::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
REQUIRE_UI_THREAD();

if (m_BrowserId == browser->GetIdentifier())
{
// Free the browser pointer so that the browser can be destroyed
m_Browser = NULL;
}
}



rpcrt4.dll!NdrpRaisePipeException(struct _NDR_PIPE_DESC *,long) Unknown
rpcrt4.dll!NdrReceive(struct _NDR_PIPE_DESC *,struct _MIDL_STUB_MESSAGE *,unsigned long,int) Unknown
rpcrt4.dll!NdrLastAsyncReceive(struct _MIDL_STUB_MESSAGE *) Unknown
rpcrt4.dll!NdrpCompleteAsyncClientCall(struct _RPC_ASYNC_STATE *,struct _NDR_ASYNC_MESSAGE *,void *) Unknown
rpcrt4.dll!Ndr64pCompleteAsyncCall(struct _RPC_ASYNC_STATE *,struct _NDR_ASYNC_MESSAGE *,void *) Unknown
rpcrt4.dll!_RpcAsyncCompleteCall@8() Unknown
winsta.dll!CWaitItem::Callback(void) Unknown
winsta.dll!CWindowNotification::Callback(void) Unknown
winsta.dll!CWaitItem::staticNotificationCallback(struct _RPC_ASYNC_STATE *,void *,enum _RPC_ASYNC_EVENT) Unknown
rpcrt4.dll!CALL::IssueNotificationMain(enum _RPC_NOTIFICATION_TYPES,union _RPC_ASYNC_NOTIFICATION_INFO *,struct _RPC_ASYNC_STATE *,enum _RPC_ASYNC_EVENT) Unknown
rpcrt4.dll!CCALL::IssueNotification(enum _RPC_ASYNC_EVENT) Unknown
rpcrt4.dll!LRPC_CCALL::AbortCall(long) Unknown
rpcrt4.dll!LRPC_BIND_CCALL::ActualCancelCall(enum tagLrpcCallStates,class LRPC_CASSOCIATION *,class LRPC_BASE_BINDING_HANDLE *,class LRPC_FAST_CAUSAL_FLOW *) Unknown
rpcrt4.dll!LRPC_CCALL::ActualCancelCall(enum tagLrpcCallStates,class LRPC_CASSOCIATION *,class LRPC_BASE_BINDING_HANDLE *,class LRPC_FAST_CAUSAL_FLOW *) Unknown
rpcrt4.dll!LRPC_BASE_CCALL::CancelCall(void) Unknown
rpcrt4.dll!LRPC_BASE_CCALL::CancelAsyncCall(int) Unknown
rpcrt4.dll!_RpcAsyncCancelCall@8() Unknown
winsta.dll!CWaitItem::StopWait(void) Unknown
winsta.dll!CWindowNotification::StopWait(void) Unknown
> winsta.dll!CWindowNotification::RemoveWindowNotificationFromList(class CWindowNotification *,int) Unknown
winsta.dll!CWindowNotification::DeleteWindowNotification(void *,struct HWND__ *,int) Unknown
winsta.dll!_tsrpcUnRegisterSessionNotifications(void *,struct HWND__ *) Unknown
wtsapi32.dll!_WTSUnRegisterSessionNotification@4() Unknown
libcef.dll!content::RenderWidgetHostViewWin::OnDestroy() Line 1255 C++
libcef.dll!content::RenderWidgetHostViewWin::ProcessWindowMessage(HWND__ * hWnd=0x00040b10, unsigned int uMsg=2, unsigned int wParam=0, long lParam=0, long & lResult=0, unsigned long dwMsgMapID=0) Line 104 C++
libcef.dll!ATL::CWindowImplBaseT<ATL::CWindow,ATL::CWinTraits<1174405120,0> >::WindowProc(HWND__ * hWnd=0x00efd240, unsigned int uMsg=2, unsigned int wParam=0, long lParam=0) Line 3523 C++
user32.dll!_InternalCallWinProc@20() Unknown
user32.dll!_UserCallWinProcCheckWow@32() Unknown
user32.dll!_DispatchClientMessage@24() Unknown
user32.dll!___fnDWORD@4() Unknown
ntdll.dll!_KiUserCallbackDispatcher@12() Unknown
user32.dll!_NtUserDestroyWindow@4() Unknown
libcef.dll!ATL::CWindowImplBaseT<ATL::CWindow,ATL::CWinTraits<1174405120,0> >::DestroyWindow() Line 3439 C++
libcef.dll!content::RenderWidgetHostViewWin::Destroy() Line 836 C++
libcef.dll!content::RenderWidgetHostImpl::Destroy() Line 1411 C++
libcef.dll!content::RenderWidgetHostImpl::Shutdown() Line 447 C++
libcef.dll!content::RenderViewHostImpl::Shutdown() Line 1047 C++
libcef.dll!content::RenderViewHostManager::~RenderViewHostManager() Line 65 C++
libcef.dll!content::WebContentsImpl::~WebContentsImpl() Line 422 C++
libcef.dll!content::WebContentsImpl::`scalar deleting destructor'(unsigned int) C++
libcef.dll!base::DefaultDeleter<content::WebContents>::operator()(content::WebContents * ptr=0x00fb8000) Line 137 C++
libcef.dll!base::internal::scoped_ptr_impl<content::WebContents,base::DefaultDeleter<content::WebContents> >::reset(content::WebContents * p=0x00000000) Line 247 C++
libcef.dll!scoped_ptr<content::WebContents,base::DefaultDeleter<content::WebContents> >::reset(content::WebContents * p=0x00000000) Line 367 C++
libcef.dll!CefBrowserHostImpl::DestroyBrowser() Line 1214 C++
libcef.dll!CefBrowserHostImpl::CloseContents(content::WebContents * source=0x00fb8000) Line 1612 C++
libcef.dll!CefBrowserHostImpl::CloseBrowser(bool force_close=true) Line 539 C++
libcef.dll!CefBrowserHostImpl::WindowDestroyed() Line 1189 C++
libcef.dll!CefBrowserHostImpl::WndProc(HWND__ * hwnd=0x00040b14, unsigned int message=2, unsigned int wParam=0, long lParam=0) Line 488 C++
user32.dll!_InternalCallWinProc@20() Unknown
user32.dll!_UserCallWinProcCheckWow@32() Unknown
user32.dll!_DispatchClientMessage@24() Unknown
user32.dll!___fnDWORD@4() Unknown
ntdll.dll!_KiUserCallbackDispatcher@12() Unknown
user32.dll!_NtUserDestroyWindow@4() Unknown
mfc110u.dll!CWnd::DestroyWindow(void) Unknown
mfc110u.dll!CWnd::~CWnd(void) Unknown
yonatan
Newbie
 
Posts: 1
Joined: Mon Aug 11, 2014 7:35 am

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 60 guests