Re: [screen-wake-lock] Remove permission check (#326)

> I think we should update `release()` to better reflect this. It should resolve the promise immediately if the ActiveLocks is not empty, but then should actually try to release at the OS level and then settle the final promise. Otherwise this could be racy.

I don't think this is racy. Firstly, it never makes sense to tell the site that it failed to release a lock, if there were even possible. The site has successfully expressed its desire to release the lock and it is up to the user agent to convey that to the underlying platform. There may be many other components of the system still holding the lock (including other sites, or other script on the same site) but that state is invisible to the current site.

-- 
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/w3c/screen-wake-lock/pull/326#issuecomment-1261510985 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 28 September 2022 22:04:32 UTC