On Thu, Dec 20, 2012 at 9:13 AM, RichardS <
rsop...@gmail.com> wrote:
> Hi Jeffry,
>
> Thanks for the feedback.This should at least be documented as we didn't spot
> it during development.
It's now documented on
trunk—
http://developer.chrome.com/trunk/extensions/alarms.html—and
that'll make its way to the stable documentation during the normal
release process. Thanks for the nudge. :)
> The issue we have is that the alarm is being used an an internal event
> timeout. So routinely, we create the alarm (period 1 minute) when we
> initiate the event and cancel it when the event completes successfully -
> usually within a couple of seconds (before event pages we where using
> setTimeout for this purpose). If it does timeout then this is an error
> condition which we need to handle.
>
> While the extension is running in this mode we do not expect it to unload as
> it remains "busy". At other times our extension is in an "idle" mode and we
> would like and expect it to unload (the benefit of event pages).
Yeah, I'm not sure the best way to handle error timeouts with event
pages. You could accept the ~5-minute minimum from chrome.alarms,
possibly augmenting that with a setTimeout call to improve the latency
in case your page doesn't get unloaded. That's not ideal because it's
more complicated for you. Can you describe in a little more detail
what errors might cause this timeout? We probably won't make any
changes around this in the near future, but I'll keep your use case in
mind in case a good fix presents itself.
Jeffrey