Get confirmation from NoScript that settings are applied
Split from tpo/ux/design#162 (comment 3199182).
We want a way for NoScript to confirm that it has received and finished applying the security level settings we send to it.
When we change the security level, we should either:
- hold the browser alive to wait for the confirmation before triggering the restart, or
- after the restart send the new settings and wait for the confirmation.
Note, in the second approach, we still need to wait for the confirmation because there may be users who have the browser.security_level.noscript_persist
preference set. Usually we re-send the NoScript settings at every startup, but when this preference is set we only want to send the settings to NoScript once when the security level changes, so we need a way to make sure that this actually happens. E.g. in cases where the browser crashes or closes early on startup.
/cc @morgan @clairehurst