MessageRouter's onQueryCanceled is called only for one tab

Having problems with building or using the JCEF Java binding? Ask your questions here.

MessageRouter's onQueryCanceled is called only for one tab

Postby bluechips23 » Wed Nov 18, 2015 9:38 am

I have a class that extends the CefMessageRouterHandlerAdapter and I am taking advantage of the Java-JS integration.

The code looks like this:
Code: Select all
public class MyMessageRouter extends CefMessageRouterHandlerAdapter {
   
   @Override
   public boolean onQuery(CefBrowser browser,
         long query_id,
         String request,
         boolean persistent,
         CefQueryCallback callback) {
      
      // do something here
      return true;
   }
   
   @Override
   public void onQueryCanceled(CefBrowser browser, long query_id) {
      log.info("We closed the tab.");
   }
}


Now on JCEF, I am launching multiple tabs (e.g. 4). And when I close the first tab (in any order), I do see the following log:
Code: Select all
We closed the tab.
WARNING:message_in_transit_queue.cc(18)] Destroying nonempty message queue


But then when I close the other tabs, I don't see the "We closed the tab" log any more.

Any reason why the message queue is getting closed and why closing other tabs doesn't fire the onQueryCanceled for them?
bluechips23
Techie
 
Posts: 12
Joined: Tue Nov 11, 2014 10:58 am

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 55 guests