Re: [ServiceWorker] Consider producing distinct objects for the same entity to enable garbage collection (#416)

Are distinct objects for the same entity expected to be in sync? E.g., must two ServiceWorker objects representing the same entity always have equal .state? In Chrome, distinct objects get individually updated, so this happens:
```javascript
register().then(function(r) {
  r.installing.addEventListener('statechange', function(e) {
    e.source.state == 'installed';
    r.waiting.state == 'installing';
 });
});
```

If it's required, I think the most straightforward implementation for Chrome would be to try to reuse the JS objects after all (although not requiring JS equality is still nice for gc). More details on #622 


---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/416#issuecomment-74889353

Received on Wednesday, 18 February 2015 16:00:18 UTC