Skip to content
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

Disallow proxies during key conversion #311

Merged
merged 1 commit into from
Nov 22, 2019
Merged

Disallow proxies during key conversion #311

merged 1 commit into from
Nov 22, 2019

Conversation

inexorabletash
Copy link
Member

@inexorabletash inexorabletash commented Nov 20, 2019

Both Gecko and Chromium disallow using proxies when specifying keys, e.g.:

const k = [1,2,3];
const p = new Proxy(k, {});
indexedDB.cmp(k, p); // throws

Enshrining this seems like a good idea.

Closes #309

The following tasks have been completed:

Implementation commitment:

  • WebKit (already has this behavior)
  • Chromium (already has this behavior)
  • Gecko (already has this behavior)

Preview | Diff

@inexorabletash
Copy link
Member Author

Test PR uploaded

inexorabletash added a commit to web-platform-tests/wpt that referenced this pull request Nov 21, 2019
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
@inexorabletash
Copy link
Member Author

@asutherland - please take a look?

Copy link
Collaborator

@asutherland asutherland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So long, proxies!

Thanks for being so proactive around all of this!

@inexorabletash
Copy link
Member Author

Verified that Safari 13 already exhibits this behavior, so I think we're good.

@inexorabletash inexorabletash merged commit 7d425a9 into master Nov 22, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 29, 2019
… 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
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Nov 29, 2019
… 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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 30, 2019
… 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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 30, 2019
… 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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 30, 2019
… 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
@inexorabletash inexorabletash deleted the noproxy branch March 27, 2020 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array proxies as keys?
2 participants