Closed Bug 731978 Opened 12 years ago Closed 12 years ago

Jetpack addons aren't always restartless: add a key to package.json to prompt user for restart

Categories

(Add-on SDK Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: public, Unassigned)

Details

I just developed an addon that simply turns on a pref that enables Touch events on Firefox Desktop[1].
Those events are only enabled while the browser starts, so my addon isn't "restartless".

I'd like to be able to add a `restart: true` key to package.json and have the user prompted for restart after enabling the addon. This would also prevent the mention "no restart" to appear on the addon page.

[1] https://addons.mozilla.org/en-US/firefox/addon/touch-enabler/
Hum. Interesting usecase! You want a restartless addon that restart :o

According to:
https://developer.mozilla.org/en/Install_Manifests#bootstrap
I do not see anything that would allow us to do that.
Jetpack rely on bootstrap.js in order to startup.
I think that the only way to have the "restart behavior" is to have bootstrap set to false. So that bootstrap.js won't be evaluated anymore.

Mossop: your thoughts?

I see multiple options here:
- learn a trick from Mossop on how to do that easily :)
- re-add an xpcom component that will fire the bootstrap.js (we had such one to support FF3.6)
- add an api that will show a dialog on first run to suggest restarting the browser
- ?
(In reply to Alexandre Poirot (:ochameau) from comment #1)
> Hum. Interesting usecase! You want a restartless addon that restart :o
> 
> According to:
> https://developer.mozilla.org/en/Install_Manifests#bootstrap
> I do not see anything that would allow us to do that.
> Jetpack rely on bootstrap.js in order to startup.
> I think that the only way to have the "restart behavior" is to have
> bootstrap set to false. So that bootstrap.js won't be evaluated anymore.
> 
> Mossop: your thoughts?
> 
> I see multiple options here:
> - learn a trick from Mossop on how to do that easily :)

There's no support for running bootstrap.js for classic add-ons right now.

> - re-add an xpcom component that will fire the bootstrap.js (we had such one
> to support FF3.6)
> - add an api that will show a dialog on first run to suggest restarting the
> browser

This seems like quite an edge-case. Very few things add-ons do actually require a restart, a few Firefox settings being the only things I can actually think of. In our triage call we came to the conclusion that the additional work in supporting this case (either for us, for the extension manager or for AMO) probably isn't worth the few cases that will need it. Perhaps we can come up with an example xpcom component that handles the bootstrap calls for those that need it but I don't think we want to bake this into the SDK right now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.