Bug 214037

Summary: sessionStorage has a much higher limit than localStorage and throws the wrong exception
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, ap, beidson, bfulgham, cdumez, rbuis, rniwa, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Anne van Kesteren 2020-07-07 01:21:41 PDT
Compare https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8251 and https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8252. The make the latter end more quickly change **2 to **4. Rather than a "QuotaExceededError" DOMException you'll get a JS RangeError strangely enough.
Comment 1 Anne van Kesteren 2020-07-07 01:22:05 PDT
Rob, this the kind of bug you were looking for? :-)
Comment 2 Radar WebKit Bug Importer 2020-07-07 18:27:11 PDT
<rdar://problem/65202902>
Comment 3 Ahmad Saleem 2022-08-20 05:05:57 PDT
I am able to reproduce this bug in Safari Technology Preview 151:

Link - https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8251

*** Safari Technology Preview 151 ***

Continue to grow in log window - 

log: 5684
log: 5685
log: 5686
log: 5687
log: 5688
log: 5689
log: 5690
log: 5691
log: 5692
log: 5693
log: 5694
log: 5695
log: 5696
log: 5697

*** Firefox Nightly 105 ***

log: object "QuotaExceededError: The quota has been exceeded." (34 props: name="QuotaExceededError", message="The quota has been exceeded.", code=22, result=2152923158...)


*** Chrome Canary 106 ***

log: object "QuotaExceededError: Failed to set a named property on 'Storage': Setting the value of '81' exceeded the quota." (29 props: stack="Error: Failed to set a named property on 'Storage': Setting the value of '81' exceeded the quota.\n    at test (<anonymous>:6:24)", code=22, name="QuotaExceededError", message="Failed to set a named property on 'Storage': Setting the value of '81' exceeded the quota."...)


_______________

Link - https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8252

*** Safari Technology Preview 151 ***

log: object "QuotaExceededError: The quota has been exceeded." (31 props: line=6, column=19, sourceURL="https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8252", code=22...)

*** Chrome Canary 106 ***

log: object "QuotaExceededError: Failed to set a named property on 'Storage': Setting the value of '81' exceeded the quota." (29 props: stack="Error: Failed to set a named property on 'Storage': Setting the value of '81' exceeded the quota.\n    at test (<anonymous>:6:26)", code=22, name="QuotaExceededError", message="Failed to set a named property on 'Storage': Setting the value of '81' exceeded the quota."...)


*** Firefox Nightly 105 ***

log: object "QuotaExceededError: The quota has been exceeded." (34 props: name="QuotaExceededError", message="The quota has been exceeded.", code=22, result=2152923158...)

______________

Just wanted to update latest test results. Thanks!