Probably missing something really obvious here, but I am unsure what it is. I subclassed CefV8Handler to create MyCefV8Handler which receives and stores information from the back end in a resources data member which is converted to a Cef array and returned when requested by a JS "get_resources" function call. That JS function was created in the OnContextCreated handler of my renderer process app object.
I am sending the data using SendProcessMessage and have confirmed that the data is received and stored in the MyCefV8Handler::resources data member (inside the CefApp::OnProcessMessageReceived handler). I am logging the received data with LOG(INFO)). I'm also logging the address of the resources data member at this time.
When the MyCefV8Handler::Execute call occurs, I log the address of the resources data member and its content.
I have confirmed that the resources data member is updated before the Execute call occurs (both in terms of the sequence of log messages and because I put a thread wait in the browser process right after sending the process message and confirmed the message was received and processed before the browser process thread continued). I've also confirmed that the resources data member address is the same in the message received handler and in the Execute call, so I know I'm accessing the same memory.
Even with these validations, I find that inside the Execute call the data member is empty. Sometime between the update from the message handler and the retrieval of the data from the same object (based on the address logged at each point) the data is cleared out. There is only one mutator for the data member and it logs the object address every time it is called. It is only called once.
I realize that it is possible this issue has nothing to do with CEF, but I wanted to see if I have violated some assumption about object state for a CefV8Handler before I look for something even more fundamental.
Any insights on what might be going on with this?