Bug 158391 - Do everything necessary to make IDBConnectionToServer::putOrAdd pass it's key by rvalue
Summary: Do everything necessary to make IDBConnectionToServer::putOrAdd pass it's key...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 149117
  Show dependency treegraph
 
Reported: 2016-06-04 20:44 PDT by Brady Eidson
Modified: 2016-06-06 19:49 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-06-04 20:44:56 PDT
Do everything necessary to make IDBConnectionToServer::putOrAdd pass it's key by rvalue

This is a spinoff from https://bugs.webkit.org/show_bug.cgi?id=158124

It seems simple to do this, but it opens a can of worms making templated objects and lambdas handle it.

But we should still do it.
Comment 1 Brady Eidson 2016-06-06 19:49:13 PDT
(In reply to comment #0)
> Do everything necessary to make IDBConnectionToServer::putOrAdd pass it's
> key by rvalue
> 
> This is a spinoff from https://bugs.webkit.org/show_bug.cgi?id=158124
> 
> It seems simple to do this, but it opens a can of worms making templated
> objects and lambdas handle it.
> 
> But we should still do it.

Actually... this is unlikely to be possible: The can of worms that opens is once that IDBKeyData rvalue hits CrossThreadCopier/CrossThreadTask.

But when an object hits those, we *have* to make an isolatedCopy.

So whether we WTFMove the IDBKeyData&& all the way along the chain, or just pass it by const IDBKeyData& all the way along the chain, we get no benefit - We have to make an isolatedCopy in the end.

That said, while exploring this I came up with some great enhancements to CrossThreadTask.