[Webkit-unassigned] [Bug 225878] New: Replace non-ownership transfer requiring uses of WTF::Function to use WTF::ScopeLambda to avoid allocation of WTF::Function
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 17 10:28:13 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=225878
Bug ID: 225878
Summary: Replace non-ownership transfer requiring uses of
WTF::Function to use WTF::ScopeLambda to avoid
allocation of WTF::Function
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Web Template Framework
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sam at webkit.org
Using WTF::Function (or std::function) in cases where are using a functor as an abstraction to allow scope customization, iteration or predicate functions is wasteful. We should instead be using the non-allocating WTF::ScopedLambda.
Some examples in WebCore are:
- the traverseSubresources() functions on various classes.
- readURLsFromPasteboardAsString() in DataTransfer.cpp
- Document::forEachMediaElement()
- etc.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210517/18cbf5ff/attachment.htm>
More information about the webkit-unassigned
mailing list