Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ElectronBrowserContext::PartitionKey comparisons (#41055)
* 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: 3f1aea9#r1099745359 Xref: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md#Default-comparisons-allowed * fixup! fix: ElectronBrowserContext::PartitionKey comparisons
- Loading branch information