[Extensions] Gracefully handle cookies with super late expiration dates
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:Mike West <mkwst@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#569309}
Showing
Please register or sign in to comment