Bug 237455

Summary: IDB serialization thread should pass isolated copy of IndexIDToIndexKeyMap to storage thread
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: WebCore Misc.Assignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, beidson, cdumez, ews-watchlist, jsbell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch for landing none

Description Sihui Liu 2022-03-03 15:53:40 PST
...
Comment 1 Sihui Liu 2022-03-03 15:56:43 PST
Created attachment 453792 [details]
Patch
Comment 2 Sihui Liu 2022-03-03 17:07:48 PST
Created attachment 453798 [details]
Patch
Comment 3 Chris Dumez 2022-03-04 08:34:28 PST
Comment on attachment 453798 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453798&action=review

r=me with improvement suggestion

> Source/WebCore/bindings/js/IDBBindingUtilities.cpp:506
> +        indexKeys.add(entry.key, indexKey.isolatedCopy());

I recommend `WTFMove(indexKey).isolatedCopy()`. A lot of types (like String) have special optimizations when isolatedCopy() is called on a r-value expression.
Comment 4 Sihui Liu 2022-03-04 08:47:35 PST
(In reply to Chris Dumez from comment #3)
> Comment on attachment 453798 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=453798&action=review
> 
> r=me with improvement suggestion
> 
> > Source/WebCore/bindings/js/IDBBindingUtilities.cpp:506
> > +        indexKeys.add(entry.key, indexKey.isolatedCopy());
> 
> I recommend `WTFMove(indexKey).isolatedCopy()`. A lot of types (like String)
> have special optimizations when isolatedCopy() is called on a r-value
> expression.

Sure, will change.
Comment 5 Sihui Liu 2022-03-04 08:50:05 PST
Created attachment 453848 [details]
Patch for landing
Comment 6 EWS 2022-03-04 10:04:44 PST
Committed r290836 (248072@main): <https://commits.webkit.org/248072@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453848 [details].
Comment 7 Radar WebKit Bug Importer 2022-03-04 10:05:17 PST
<rdar://problem/89820257>