CefContentFilter gets freed too quick?

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.

CefContentFilter gets freed too quick?

Postby Patrick » Mon Aug 29, 2011 2:59 am

I'm currently trying to monitor some AJAX connections
I created a CefContentFilter instance in OnResourceReponse and everything worked fine, i can get the data received and parse them.
but after sometime, it doesn't work anymore. the browser showed response, but OnResourceReponse and ProcessData are not called.
I'm told that some push notification connections will send whatever is available then keep the connection open and reuse the same connection to send more data until a timeout
I traced my program and found that after I received the first batch of data, the destructor is called then no more callbacks are triggered.
Did I use a wrong approach to monitor these kind of connections?
Patrick
Newbie
 
Posts: 5
Joined: Sun Aug 28, 2011 11:20 pm

Re: CefContentFilter gets freed too quick?

Postby magreenblatt » Mon Aug 29, 2011 8:26 am

Is the Drain() method being called? If so, this indicates that the request has completed. You can set breakpoints in libcef/browser_resource_loader_bridge.cc NotifyReceivedResponse, NotifyReceivedData and NotifyCompletedRequest to understand what's going on.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefContentFilter gets freed too quick?

Postby Patrick » Tue Aug 30, 2011 1:35 am

Thanks for the hint!

After debugging on those function, I found that it was my program's logic that had problems...
I'm sorry for asking too soon...my apologies!
Patrick
Newbie
 
Posts: 5
Joined: Sun Aug 28, 2011 11:20 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 75 guests