-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array proxies as keys? #309
Comments
The algorithms where we It makes sense to me to also forbid proxies where we directly invoke algorithms without first performing the clone step. (Also, Firefox/Gecko is a hard no on supporting proxies in IndexedDB were that not already the case!) |
SGTM. I'll put up a spec PR and wpt PR, time permitting, changing the text to the exotic Array object check. |
Arrays of keys are valid keys, but implementations don't allow proxies of arrays to be keys. Add a test, corresponding to pending spec PR: Bug: w3c/IndexedDB#309 PR: w3c/IndexedDB#311
All engines disallow using proxies when specifying keys. Update spec text to reflect this. Closes #309
… valid keys, a=testonly Automatic update from web-platform-tests Indexed DB: Verify array proxies are not valid keys (#20352) Arrays of keys are valid keys, but implementations don't allow proxies of arrays to be keys. Add a test, corresponding to pending spec PR: Bug: w3c/IndexedDB#309 PR: w3c/IndexedDB#311 -- wpt-commits: c65519066cf95e902607cce03a9057b859a50242 wpt-pr: 20352
… valid keys, a=testonly Automatic update from web-platform-tests Indexed DB: Verify array proxies are not valid keys (#20352) Arrays of keys are valid keys, but implementations don't allow proxies of arrays to be keys. Add a test, corresponding to pending spec PR: Bug: w3c/IndexedDB#309 PR: w3c/IndexedDB#311 -- wpt-commits: c65519066cf95e902607cce03a9057b859a50242 wpt-pr: 20352
… valid keys, a=testonly Automatic update from web-platform-tests Indexed DB: Verify array proxies are not valid keys (#20352) Arrays of keys are valid keys, but implementations don't allow proxies of arrays to be keys. Add a test, corresponding to pending spec PR: Bug: w3c/IndexedDB#309 PR: w3c/IndexedDB#311 -- wpt-commits: c65519066cf95e902607cce03a9057b859a50242 wpt-pr: 20352 UltraBlame original commit: a1415e648ad42f37c59425a107c33728af78cfb1
… valid keys, a=testonly Automatic update from web-platform-tests Indexed DB: Verify array proxies are not valid keys (#20352) Arrays of keys are valid keys, but implementations don't allow proxies of arrays to be keys. Add a test, corresponding to pending spec PR: Bug: w3c/IndexedDB#309 PR: w3c/IndexedDB#311 -- wpt-commits: c65519066cf95e902607cce03a9057b859a50242 wpt-pr: 20352 UltraBlame original commit: a1415e648ad42f37c59425a107c33728af78cfb1
… valid keys, a=testonly Automatic update from web-platform-tests Indexed DB: Verify array proxies are not valid keys (#20352) Arrays of keys are valid keys, but implementations don't allow proxies of arrays to be keys. Add a test, corresponding to pending spec PR: Bug: w3c/IndexedDB#309 PR: w3c/IndexedDB#311 -- wpt-commits: c65519066cf95e902607cce03a9057b859a50242 wpt-pr: 20352 UltraBlame original commit: a1415e648ad42f37c59425a107c33728af78cfb1
All engines disallow using proxies when specifying keys. Update spec text to reflect this. Closes #309
I noticed that this throws in both Chrome and Firefox:
In Chrome, at least, the proxy fails an internal "is this an array?" check.
In the spec convert a value to a key calls ECMAScript's IsArray which would seem to return true for array proxies.
At the very least, we don't have tests.
Should we update the spec to exclude proxies, e.g. replacing "if IsArray(input)" with "if input is an Array exotic object"?
Alternately, should array proxies be supported? What are the consequences of allowing these? Would the value→key conversion algorithm potentially blow up in more places?
The text was updated successfully, but these errors were encountered: