w3c / web-locks

Cross-tab resource coordination API
https://w3c.github.io/web-locks/
Other
124 stars 16 forks source link

Lock request queues are never initialized #68

Closed saschanaz closed 3 years ago

saschanaz commented 3 years ago

https://wicg.github.io/web-locks/#algorithm-request-lock

  1. Enqueue the following steps to the lock task queue:
    1. Let queueMap be origin’s lock request queue map.
    2. Let queue be queueMap[name].

But nothing actually set queueMap[name], so queue is always nonexistent.

inexorabletash commented 3 years ago

Good catch.

There are four instances of "Let queue be queueMap[name]" - we can either:

@pwnall - Any preferences?

pwnall commented 3 years ago

I prefer the algorithm approach. And this happens to match the PR you have up. :+1: