We have created a class called ApiCallHandler that inherits from CefResourceHandler.
When ProcessRequest is called, we start up a thread to handle the request, passing the CefRefPtr<CefRequest>, CefRefPtr<CefCallback>, as well as a pointer to another object that is part of the ApiCallHandler class.
Most of the time, everything seems to work fine. However, we have noticed that if the request takes a bit to complete (say, just a Sleep of 2 seconds), the ApiCallHandler object will sometimes be destroyed before we call Continue() on the CefCallback.
Are we misinterpreting how CefResourceHandler is meant to be used?
Using cef_binary_3.2987.1591.gd3e47f5_windows32 from Spotify.