Cancel NetworkService requests when the browser is destroyed (see issue #2622).

Pending requests that are associated with a browser will be canceled when that
browser is destroyed. Pending requests that are not associated with a browser
(e.g. created using CefURLRequest::Create), and that use the global context, may
still be pending when CefShutdown is called. For this reason the
no_debugct_check attribute has been added for CefResourceRequestHandler and
CefCookieAccessFilter interfaces.

To test: Load a YouTube video or other long-loading content in cefclient and
close the application. No assertions trigger for leaked CefFrame objects.
This commit is contained in:
Marshall Greenblatt
2019-05-18 12:15:04 +03:00
parent ba0e1b5719
commit 2ea173a254
8 changed files with 181 additions and 128 deletions

View File

@ -55,7 +55,7 @@ class CefCookieAccessFilter;
// methods of this class will be called on the IO thread unless otherwise
// indicated.
///
/*--cef(source=client)--*/
/*--cef(source=client,no_debugct_check)--*/
class CefResourceRequestHandler : public virtual CefBaseRefCounted {
public:
typedef cef_return_value_t ReturnValue;
@ -205,7 +205,7 @@ class CefResourceRequestHandler : public virtual CefBaseRefCounted {
// resource requests. The methods of this class will be called on the IO thread
// unless otherwise indicated.
///
/*--cef(source=client)--*/
/*--cef(source=client,no_debugct_check)--*/
class CefCookieAccessFilter : public virtual CefBaseRefCounted {
public:
///