Bug 1069227 - [Loop] Make sure that we recover from an expired token situation

See bug https://bugzilla.mozilla.org/show_bug.cgi?id=1069227 please.
`if (!document.hidden) { return; }` avoids indentation