This is an improvement in upstream that has revealed a missing check. Chromium change: https://chromium.googlesource.com/chromium/src/+/f7ba8d812eec7d734828d9fbc7c8357735439847 commit f7ba8d812eec7d734828d9fbc7c8357735439847 Author: Chris Fredrickson <cfredric@chromium.org> Date: Fri Dec 6 23:39:32 2024 +0000 Mark content::SetCookie as [[nodiscard]] This also updates SetCookie to use base::optional_ref instead of a raw pointer, which is more ergonomic (since it allows the use of temporaries). Change-Id: I04c29e666fd0ed2e44fa1cc56332cf9f5ff8e5ee