electron/shell
trop[bot] b70b76e97f
fix: ElectronBrowserContext::PartitionKey comparisons (#41083)
* fix: ElectronBrowserContext::PartitionKey comparisons

Use c++20 default comparisons to simplify + fix PartitionKey sorting:

- The equality operator is broken. `PartitionKey{"foo", false}` is both
  equal, to and less than, `PartitionKey{"foo", true}`

- For some keys, the same session can be retrieved via both `fromPath()`
  and `fromPartition()`. This use case was discussed and removed from
  the original PR after code review said "always returning different
  sessions feels lower maintenance." The current behavior is a bug that
  comes from the comparison operators not checking the keys' types.

Xref: 3f1aea9af9 (r1099745359)

Xref: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md#Default-comparisons-allowed

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* fixup! fix: ElectronBrowserContext::PartitionKey comparisons

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-01-23 13:02:02 -06:00
..
app fix: ignore all NODE_ envs from foreign parent in node process (#40880) 2024-01-04 13:34:10 +01:00
browser fix: ElectronBrowserContext::PartitionKey comparisons (#41083) 2024-01-23 13:02:02 -06:00
common feat: add net module to utility process (#40967) 2024-01-18 09:56:32 -05:00
renderer feat: enable code cache for custom protocols (#40709) 2023-12-13 12:48:48 -06:00
services/node feat: add net module to utility process (#40967) 2024-01-18 09:56:32 -05:00
utility chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00