Hi,
I am using JCEF for my application. I was using old version of JCEF and never upgraded it in last 2 years till I realized there is a bad memory leak issue with my program and I think it is a bug with my version of JCEF.
so I upgraded it to latest version (as of yesterday) and I realized many things changed in terms of structure and I have to change my own code to launch the cefClient in y code.
The problem that I have is the method that has been changed where function ".getResourceHandler" used to call in CefClient.Java. I see it is changed to ".getResourceRequestHandler" in new version.
so I changed my handler classes and instead of calling a new resourceHandler in "getResourceHandler" inside getReguestHandler class, I call a new "ResourceRequestHandler" inside getResourceRequestHandler and inside that I call a getResourceHandler.
so far so good. I pass my local handlers and all good. but inside "processRequest" function, for some reason, my CefRequest that I passed earlier to resourceHandler, gets reset to 0. I am sure that I do not have any line inside my code that reset that to 0. it has to be something inside CEF java codes that this value gets reset.
can anyone help me to see what is the right sequence of creating the CEF frame with local address and handler options?
FYI, here is my old sequence that used to work perfect with old JCEF V3.33....
UiMain lUiMain = new UiMain(); //local customized HTTP Handlers
CefSettings lCefSettings = new CefSettings();
lCefSettings.windowless_rendering_enabled = OS.isLinux();
CefApp lCefApp = CefApp.getInstance(lCefSettings);
CefClient lCefClient = lCefApp.createClient();
lCefClient.addRequestHandler(new ChromiumRequestHandler(lUiMain));// here I do what I explained above.
lCefClient.addLifeSpanHandler(new ChromiumLifeSpanHandler());
lCefClient.addDownloadHandler(new ChromiumDownloadHandler());