Bug 227813 - [IndexedDB] KeyPath validity checks should happen on the cloned value, not the original one
Summary: [IndexedDB] KeyPath validity checks should happen on the cloned value, not th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-08 14:08 PDT by Chris Dumez
Modified: 2021-07-08 17:12 PDT (History)
10 users (show)

See Also:


Attachments
Patch (13.35 KB, patch)
2021-07-08 14:11 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-07-08 14:08:46 PDT
KeyPath validity checks should happen on the cloned value, not the original one:
- https://www.w3.org/TR/IndexedDB/#add-or-put (Step 11.1)
- https://www.w3.org/TR/IndexedDB/#dom-idbcursor-update (Step 9.1)

This is causing the following WPT test to fail in WebKit:
https://wpt.live/IndexedDB/clone-before-keypath-eval.html

This test is passing in Chrome and Gecko.
Comment 1 Chris Dumez 2021-07-08 14:11:46 PDT
Created attachment 433162 [details]
Patch
Comment 2 Geoffrey Garen 2021-07-08 16:33:13 PDT
Comment on attachment 433162 [details]
Patch

r=me
Comment 3 EWS 2021-07-08 17:11:29 PDT
Committed r279767 (239537@main): <https://commits.webkit.org/239537@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433162 [details].
Comment 4 Radar WebKit Bug Importer 2021-07-08 17:12:17 PDT
<rdar://problem/80350450>