[Webkit-unassigned] [Bug 137664] Add StringCapture helper for thread-safe lambda capture

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 13 13:47:27 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137664


Anders Carlsson <andersca at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #239740|review?                     |review+
               Flag|                            |




--- Comment #3 from Anders Carlsson <andersca at apple.com>  2014-10-13 13:47:22 PST ---
(From update of attachment 239740)
View in context: https://bugs.webkit.org/attachment.cgi?id=239740&action=review

> Source/WTF/wtf/text/WTFString.h:637
> +// For thread-safe lambda capture:

Could use a FIXME saying that once we use C++14 we don't need this.

> Source/WTF/wtf/text/WTFString.h:642
> +    explicit StringCapture(const String& string) : m_string(string) { }

I think you should add a move constructor as well.

> Source/WTF/wtf/text/WTFString.h:644
> +    const String& string() const { return m_string; }

Maybe add a

String string() releaseString { return m_string; }

as well? (Of course, in that case the lambda would have to be made mutable).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list