On Tue, Apr 29, 2014 at 1:32 PM, Peter Beverloo <[email protected]> wrote: > On Tue, Apr 29, 2014 at 1:23 PM, Anne van Kesteren <[email protected]> wrote: >> Well yes, the question is why the application cares about garbage on >> the push server. How would it handle the return value of unregister() >> other than simply ignoring it? > > Since we only allow a single registration, register() would simply return > the current registration at least until unregister() has succeeded. A > scenario in which the developer might want to renew the registrations is > where their database was compromised.
We could also make unregister(); register() work. That actually seems better and more likely to lead to success. It does make for a slightly more complicated register() as it has to check an unregister() invoked flag, but that's not too bad. > It would still require another synchronous operation, which is unwanted for > browsers using multiple processes. Chrome uses a synchronous IPC message for > getting the notification permission (it is not known at renderer startup), > and I would strongly prefer if we can avoid adding others. Interesting. Maybe we should put a use counter on Notification.permission then. Somewhat sad that nobody raised this earlier. -- http://annevankesteren.nl/
