{"action":"created","issue":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/800","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/800/labels{/name}","comments_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/800/comments","events_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/800/events","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/800","id":121632863,"number":800,"title":"should update() during top level script evaluation be ignored?","user":{"login":"wanderview","id":1256526,"avatar_url":"https://avatars.githubusercontent.com/u/1256526?v=3","gravatar_id":"","url":"https://api.github.com/users/wanderview","html_url":"https://github.com/wanderview","followers_url":"https://api.github.com/users/wanderview/followers","following_url":"https://api.github.com/users/wanderview/following{/other_user}","gists_url":"https://api.github.com/users/wanderview/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderview/subscriptions","organizations_url":"https://api.github.com/users/wanderview/orgs","repos_url":"https://api.github.com/users/wanderview/repos","events_url":"https://api.github.com/users/wanderview/events{/privacy}","received_events_url":"https://api.github.com/users/wanderview/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-11T03:57:22Z","updated_at":"2015-12-15T01:44:33Z","closed_at":null,"body":"The wpt tests we imported from blink has this code at the top level of one of its service worker scripts:\r\n\r\n>  // update() during the script evaluation should be ignored.\r\n>  self.registration.update();\r\n\r\nI don't see anything in the spec that does this.  It seems like it might be a good idea, though, to avoid potential infinite async update loops.  For example, if the install event fails or something I think you could end up with an endless set of failing update jobs running in the background."},"comment":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/comments/164615709","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/800#issuecomment-164615709","issue_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/800","id":164615709,"user":{"login":"mattto","id":1782098,"avatar_url":"https://avatars.githubusercontent.com/u/1782098?v=3","gravatar_id":"","url":"https://api.github.com/users/mattto","html_url":"https://github.com/mattto","followers_url":"https://api.github.com/users/mattto/followers","following_url":"https://api.github.com/users/mattto/following{/other_user}","gists_url":"https://api.github.com/users/mattto/gists{/gist_id}","starred_url":"https://api.github.com/users/mattto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattto/subscriptions","organizations_url":"https://api.github.com/users/mattto/orgs","repos_url":"https://api.github.com/users/mattto/repos","events_url":"https://api.github.com/users/mattto/events{/privacy}","received_events_url":"https://api.github.com/users/mattto/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T01:44:33Z","updated_at":"2015-12-15T01:44:33Z","body":"Looks like we reject with a InvalidStateError.\r\n\r\nThe spec probably needs to be revised? In update(), Get Newest Worker is not necessarily null, if there's an active or waiting worker. Then in 9.2 Update, the installing version would be terminated."}}