delphic++builder-xechromium-embedded

dcef3 child process doesn't quit


I'm trying dcef3 to make a simple browser which opens a fixed url. I've set CefSingleProcess as false. As soon as I run the application, two processes of the same name are created (watching in the process explorer). Quit the application, and only one of the processes goes, other remains. The OnProcessMessageReceived call never gets called. The OnRenderProcessTerminated call never gets called. Is there anything specific I need to do to get cef to kill it's child processes? Any pointers would be helpful. Thanks!


Solution

  • Solution: In the application, I was doing this:

    CefSingleProcess = false;
    Application->Initialize();
    Application->MainFormOnTaskBar = true;
    Application->CreateForm(__classid(TForm2), &Form2);
    Application->Run();
    

    I had skipped a call to CefLoadLibDefault(). To fix it, I did this.

    CefSingleProcess = false;
    if( !CefLoadLibDefault())
            return 0;
    Application->Initialize();
    Application->MainFormOnTaskBar = true;
    Application->CreateForm(__classid(TForm2), &Form2);
    Application->Run();
    

    All working fine now. @pac, hope you find this useful.