Closed Bug 408805 Opened 16 years ago Closed 16 years ago

Quit-application-granted not caught after uninstalling the extension

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: priyav, Unassigned)

Details

Attachments

(2 files)

18.67 KB, application/x-xpinstall
Details
1013 bytes, application/x-javascript
Details
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

Hi,

We are doing some clean up when we uninstall our extension. So, we wrote the snippet of code in the observer "quit-application-granted". This worked fine in lower versions of firefox (<3.0). I.e., after clicking on the "uninstall" button in the "Tools->Addons" window, it just shows a message saying "It will be uninstalled when you restart the firefox". So, we used to manually close the firefox browser using the "X" on the top right corner. During this "X" click, "Quit-application-granted" used to get called and everything went fine. But, with FF3.0 beta1, there is this "Restart Firefox" button, only on clicking which this "quit-application-granted" gets called. Itz not getting caught when we manually close the browser using the "X" button. Due to this behaviour, we are not able to attain that we want to. Because our extension can be uninstalled using Tools->Addons Extension Manager and one thru our Extension itself. So, when we uninstall using our Extension, the AddOn window with "Restart Firefox" will not be available. Even with Addons extension manager, we can never expect the user to restart the browser using that option "Restart Firefox". He can very well do it by closing it manually using "X". 
So, is there anyway to acheive this? any new observer added to attain this? or is this a miss out in the current implementation of quit-application-granted in FF3.0beta1. Pls let me know.

Thanks.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Can you please clarify, are you saying that the quit-application-granted signal is no longer sent when shutting down Firefox by closing it's windows?
Correct....quit-application-granted signal is not sent when I close the browser window using "X".
Correct....quit-application-granted signal is not sent when I close the browser window using "X".
Please can you test in a more recent build of Firefox. A test on the current nightly shows quit-application-granted being sent as normal.
I tested in the most recent build "firefox-3.0b3pre.en-US.win32.installer.exe".
Quit-application-granted is sent only when I click on the "Restart Firefox" button on the AddOns window. Itz not sent when I close the browser using "X".
Could you please test this in a clean profile, I am quite clearly seeing the quit-application-granted signal being sent here.

Also maybe provide a small testcase of code that demonstrates the problem?
Attached file Testcase XPI
Steps to reproduce :

FF2.0
=====
1. Install the XPI
2. Close the browser using "X"
3. Pls note "quit-application-granted" being sent.

FF3.0
=====

1. Install the XPI
2. Close the browser using "X"
3. Pls note "quit-application-granted" NOT being sent.
4. Open the browser again
5. Click Tools->Add-ons->Restart Firefox
6. Pls note "quit-application-granted" being sent.

Hope this helps...let me know for more details..
Attached file Source script
Component: Extension/Theme Manager → XRE Startup
Product: Firefox → Toolkit
QA Contact: extension.manager → xre.startup
Version: unspecified → Trunk
quit-application-granted is being sent but it is now sent once the decision to quit has been finalised, which is after the window your code is attached to has closed.

If you wish to listen for this you will have to do so from a component, not code in any window.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.