1. 25 Nov, 2021 9 commits
  2. 24 Nov, 2021 3 commits
    • Robert Knight's avatar
      Revise `PortProvider._channels` data structure · 82541f3a
      Robert Knight authored
      The `PortProvider._channels` map was used only to keep track of which
      channel requests have been handled for a particular frame. The
      `WeakMap<Window, MessageChannel>` was in fact used as a set rather than
      a map. Only the presence of entries affected behavior, not the stored
      MessageChannel values.
      
      Change the data structure and comments to make its purpose clearer.
      82541f3a
    • Robert Knight's avatar
      Remove a misplaced comment · 20567b07
      Robert Knight authored
      This comment provides general information about how MessagePorts work,
      but isn't directly related to any of the surrounding code.
      
      Of the two comments here, the second one is the most useful information
      to consumers of the PortProvider and PortFinder interfaces, but it is
      well covered by eg. MDN's documentation on MessagePort.
      20567b07
    • Robert Knight's avatar
      Streamline code for responding to port requests · 625bdb9d
      Robert Knight authored
      Rework the code to make the code path for the sidebar-host channel more
      similar to other channels. As a result the `_sendPorts` helper was only
      called in one place and can be inlined where it is called to make the
      overall logic easier to follow.
      625bdb9d
  3. 23 Nov, 2021 16 commits
  4. 22 Nov, 2021 7 commits
  5. 19 Nov, 2021 1 commit
    • Eduardo Sanz García's avatar
      Use `WeakMap` to store `MessageChannel` · 0c0a639b
      Eduardo Sanz García authored
      We use `Window` objects as keys on a map. Windows can be removed.
      `WeakMap` has the characteristic that keys that are claimed by the
      garbage collector are removed from the map. In this way, we are memory
      friendly and don't retain any defunct object.
      0c0a639b
  6. 17 Nov, 2021 4 commits