Launching CEF application as a separate Process

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Launching CEF application as a separate Process

Postby aksjain » Mon Oct 03, 2016 3:30 am

Hi All,
I am using CEF for the first time as we have a requirement to render a login webapp from our application.
Our main application is native and windows only.
Since we can not introduce any run-time dependency on our main application, we are exploring to launch CEF application as a separate child process and will implement IPC for communication with the same.
In our implementation we hace followed following steps for launching the separate CEF process.
1. Create a new window using "CreateWindow" API and share that handle with Child process using IPC mechanism.
2. The shared parent window handle is used to create the Browser inside that by setting up.
Code: Select all
window_info.SetAsChild(pHwnd, ParentWinRect);

"pHwnd" is the handle of parent window being shared by the parent process.
3. The CEF application is "cefsimple.exe"(the sample application comes in the bundle) with some tweeks like destination URL and some more configurations being shared by the Parent process.
The problem i am facing with this implementation is that, the moment i close my parent window, CEF throws certain errors while checking the "RefCounts".
the exact line where i get the debug breaks is:
Code: Select all
#if DCHECK_IS_ON()
  // Check that all wrapper objects have been destroyed
  DCHECK(base::AtomicRefCountIsZero(&CefAuthCallbackCToCpp::DebugObjCt));
  DCHECK(base::AtomicRefCountIsZero(
      &CefBeforeDownloadCallbackCToCpp::DebugObjCt));
  DCHECK(base::AtomicRefCountIsZero(&CefBinaryValueCToCpp::DebugObjCt));

this code is inside "libcef_dll_wrapper.cc".
I am not getting any pointers for the reason of this issue.
Can somebody please share some inputs?
aksjain
Newbie
 
Posts: 1
Joined: Mon Oct 03, 2016 3:15 am

Re: Launching CEF application as a separate Process

Postby magreenblatt » Mon Oct 03, 2016 10:54 am

How are you shutting down the "cefsimple.exe" process?
magreenblatt
Site Admin
 
Posts: 10748
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron