Summary: | Lambdas passed to WebCore::subspaceForImpl()should use std::forward | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Component: | Bindings | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | cdumez, darin, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Other | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
David Kilzer (:ddkilzer)
2022-06-09 21:02:13 PDT
The generated bindings code creates over 1700 bugprone-move-forwarding-reference warnings from clang-tidy in WebCore. 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 *** |