-
Dylan Cutler authored
In http://crrev.com/c/2504089 I changed this function to use the new CanonicalCookie factory method FromStorage() which returns a nullptr if the resulting CanonicalCookie does not pass IsCanonical(). Since it turns out not every system cookie is guaranteed to be canonical, which means dereferencing the pointer returned by FromStorage sometimes resulted in a crash. In order to fix this, this CL changes CanonicalCookieFromSystemCookie to return the unique_ptr returned by FromStorage. It also updates the callsites of CanonicalCookieFromSystemCookie to ignore the cookie in the case that FromStorage returns a nullptr. Bug: 1146386 Change-Id: Ic00a1e14af065b5b8b68e36d89ec043d5385f5b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527729 Commit-Queue: Dylan Cutler <dylancutler@google.com> Reviewed-by:
Mark Cogan <marq@chromium.org> Reviewed-by:
Lily Chen <chlily@chromium.org> Cr-Commit-Position: refs/heads/master@{#826932}
055a5b04