WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 248645
241501
Lambdas passed to WebCore::subspaceForImpl()should use std::forward
https://bugs.webkit.org/show_bug.cgi?id=241501
Summary
Lambdas passed to WebCore::subspaceForImpl()should use std::forward
David Kilzer (:ddkilzer)
Reported
2022-06-09 21:02:13 PDT
Lambdas passed to WebCore::subspaceForImpl()should use std::forward. Found by clang static analyzer.
Attachments
Patch v1
(4.44 KB, patch)
2022-06-09 21:06 PDT
,
David Kilzer (:ddkilzer)
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2022-06-09 21:03:04 PDT
The generated bindings code creates over 1700 bugprone-move-forwarding-reference warnings from clang-tidy in WebCore.
Radar WebKit Bug Importer
Comment 2
2022-06-09 21:03:13 PDT
<
rdar://problem/94782118
>
David Kilzer (:ddkilzer)
Comment 3
2022-06-09 21:06:26 PDT
Created
attachment 460154
[details]
Patch v1
Darin Adler
Comment 4
2022-06-10 09:41:15 PDT
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.
Darin Adler
Comment 5
2022-06-10 09:54:51 PDT
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.
Darin Adler
Comment 6
2022-06-10 09:55:48 PDT
(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.
David Kilzer (:ddkilzer)
Comment 7
2022-12-29 20:01:20 PST
Dupe of:
Bug 248645
: Replace WTFMove() with std::forward() in CodeGeneratorJS.pm *** This bug has been marked as a duplicate of
bug 248645
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug