Re: [runtime] Privileged Applications Extensions spec proposal

On Jun 27, 2013 12:51 AM, "Janusz Majnert" <j.majnert@samsung.com> wrote:
>
>
>
> On 2013-06-27 03:56, Jonas Sicking wrote:
>>
>> However applyUpdate() is something that probably possibly shouldn't
>> exist at all (other than internally in the runtime implementation). At
>> least in FirefoxOS we haven't implemented support for having multiple
>> versions of an app installed at the same time. Because of that it's
>> important that an update isn't applied as long as the app is running.
>> And so applyUpdate() is important that it's only called when it's
>> guaranteed that the app isn't running. Something which can't be
>> guaranteed as long as the applyUpdate() function is exposed.
>
>
> I don't understand how it is a problem that an application is running during an update? Isn't it the "industy standard" to terminate an app before an update takes place (or make a user terminate it beforehand). Applications can detect being shut down (via the onterminate handler) at which point they do all the stuff that they would if the user shut them down manually or if the system decided to close them (Android does something like that).

That's a good point. In FirefoxOS we decided that we did not want to
forcibly shut down applications to apply updates. So updates are
instead automatically applied as soon as the application closes.
However that's a decision that should be up to the implementation. So
we need to make sure that the API supports either model.

I don't know if that means having an applyUpdate() function either
reports an error if the application is currently running, or forcibly
shuts down the application, depending on runtime policies. Or if the
solution is to not have an applyUpdate() function and instead let use
the exit() function if you want to ensure that an update is
immediately applied.

/ Jonas

Received on Wednesday, 3 July 2013 07:43:58 UTC