Bug 237455 - IDB serialization thread should pass isolated copy of IndexIDToIndexKeyMap to storage thread
Summary: IDB serialization thread should pass isolated copy of IndexIDToIndexKeyMap to...
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: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-03 15:53 PST by Sihui Liu
Modified: 2022-03-04 10:05 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.78 KB, patch)
2022-03-03 15:56 PST, Sihui Liu
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (5.10 KB, patch)
2022-03-03 17:07 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (5.06 KB, patch)
2022-03-04 08:50 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>