• Devlin Cronin's avatar
    [Extensions] Gracefully handle cookies with super late expiration dates · e4182b17
    Devlin Cronin authored
    On 32-bit machines, cookies with expiration dates beyond the year 2037
    are stored with the expiration time as base::Time::Max(). When
    converting to a double, this will return infinity(). infinity() cannot
    be serialized in JSON, which can lead to a crash.
    
    Instead, gracefully handle this case by setting the cookie to expire at
    std::numeric_limits<double>::max(). Add a regression test for the same.
    
    Bug: 848221
    Change-Id: Id1bae19f785d864bf6d926f360a31f485d6dd574
    Reviewed-on: https://chromium-review.googlesource.com/1105122Reviewed-by: default avatarMike West <mkwst@chromium.org>
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569309}
    e4182b17
BUILD.gn 290 KB