Bug 227813

Summary: [IndexedDB] KeyPath validity checks should happen on the cloned value, not the original one
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, beidson, darin, ews-watchlist, ggaren, jsbell, sam, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>