Lambdas passed to WebCore::subspaceForImpl()should use std::forward. Found by clang static analyzer.
The generated bindings code creates over 1700 bugprone-move-forwarding-reference warnings from clang-tidy in WebCore.
<rdar://problem/94782118>
Created attachment 460154 [details] Patch v1
I worry that these errors indicate that some of our recent conversions from WTFMove(x) to std::forward<decltype(x)>(x) may have changed our code to copy rather than move. I don’t understand precisely what the issue is.
I think the mistake is in WebCoreJSClientData.h: - setServer(subspaces, uniqueSubspace); + setServer(subspaces, WTFMove(uniqueSubspace)); - setClient(clientSubspaces, uniqueClientSubspace); + setClient(clientSubspaces, WTFMove(uniqueClientSubspace)); But also I think this idiom is peculiar where we are passing two copies of the same pointer.
(In reply to Darin Adler from comment #5) > But also I think this idiom is peculiar where we are passing two copies of > the same pointer. Sorry that sentence was wrong, but I think the rest of the above is right.
Dupe of: Bug 248645: Replace WTFMove() with std::forward() in CodeGeneratorJS.pm *** This bug has been marked as a duplicate of bug 248645 ***