Skip to content
Commit a1d85e89 authored by Evan Stade's avatar Evan Stade Committed by Chromium LUCI CQ
Browse files

Reject when `navigator.storage.estimate()` fails to calculate usage

Previously an error in retrieving buckets would return a usage of -1
(which is later converted to an unsigned integer, so is reported as
2^64). This changes QuotaManagerImpl logic to report an error which
ultimately causes the promise to reject.

This also changes the type of the rejection to be a TypeError instead of
a DOMException to match the spec:
https://storage.spec.whatwg.org/#dom-storagemanager-estimate

Bug: 1451614
Change-Id: I2c23f5403e5410298e6279ea4982c1ad2b9b30a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4666778


Reviewed-by: default avatarAyu Ishii <ayui@chromium.org>
Reviewed-by: default avatarMatthew Denton <mpdenton@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1168402}
parent cec05a42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment