OnBrowserDestroyed never called

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.

Re: OnBrowserDestroyed never called

Postby magreenblatt » Tue Nov 29, 2016 12:04 pm

digory wrote: from the point of view of having a clean API, OnBrowserDestroyed should always be called even if the renderer process is being terminated.

It is an intentional design choice in Chromium. Therefore what you're requesting will not happen.

digory wrote:For instance, if I was to allocate some system-wide resource that's not automatically freed, say a pipe or global memory, then I would have a hard time finding a good place where to free it.

Don't do that from the renderer process.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: OnBrowserDestroyed never called

Postby Czarek » Tue Nov 29, 2016 1:42 pm

magreenblatt wrote:
digory wrote: from the point of view of having a clean API, OnBrowserDestroyed should always be called even if the renderer process is being terminated.

It is an intentional design choice in Chromium. Therefore what you're requesting will not happen.

digory wrote:For instance, if I was to allocate some system-wide resource that's not automatically freed, say a pipe or global memory, then I would have a hard time finding a good place where to free it.

Don't do that from the renderer process.

It would be nice to have this stated in doc comments.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: OnBrowserDestroyed never called

Postby magreenblatt » Tue Nov 29, 2016 1:46 pm

Czarek wrote:
magreenblatt wrote:
digory wrote: from the point of view of having a clean API, OnBrowserDestroyed should always be called even if the renderer process is being terminated.

It is an intentional design choice in Chromium. Therefore what you're requesting will not happen.

digory wrote:For instance, if I was to allocate some system-wide resource that's not automatically freed, say a pipe or global memory, then I would have a hard time finding a good place where to free it.

Don't do that from the renderer process.

It would be nice to have this stated in doc comments.

Sure :) Feel free to file a bug and/or submit a PR.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: OnBrowserDestroyed never called

Postby Czarek » Tue Nov 29, 2016 2:15 pm

magreenblatt wrote:
Czarek wrote:It would be nice to have this stated in doc comments.

Sure :) Feel free to file a bug and/or submit a PR.

While on it, how about removing the OnBrowserDestroyed callback from the renderer process? :) What's the point of having it if we can't rely on it being called.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: OnBrowserDestroyed never called

Postby magreenblatt » Tue Nov 29, 2016 4:14 pm

Czarek wrote:
magreenblatt wrote:
Czarek wrote:It would be nice to have this stated in doc comments.

Sure :) Feel free to file a bug and/or submit a PR.

While on it, how about removing the OnBrowserDestroyed callback from the renderer process? :) What's the point of having it if we can't rely on it being called.

The same renderer process can be used for multiple browsers in certain circumstances. The OnBrowserDestroyed callback is useful for cleaning up state in that case.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 38 guests