In components we can not receive quit-application-requested,when the firefox will shutdown.
Hi DongShengXue, is this a problem in Fennec specific or is this more related to e10s?
I found this problem in fennec only.
This problem is happening because the code that closes the application is responsible for sending and handling the "quit-application-requested", "quit-appplication-granted" and "quit-application" notifications. Fennec does send out the "quit-application-requested" notification when we need to restart the app. However, we never send it out when closing the app. We should probably check for _any_ open windows here: http://mxr.mozilla.org/mozilla-central/source/mobile/chrome/content/browser.js#469 and if there are none left, except for the current window, we should send out the "quit-application-requested" and "quit-application-granted" messages. For now, the work around is to use the "browser-lastwindow-close-requested" and "browser-lastwindow-close-granted" messages. Desktop uses these too.