[webkit-reviews] review granted: [Bug 137664] Add StringCapture helper for thread-safe lambda capture : [Attachment 239740] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Oct 13 13:47:26 PDT 2014
Anders Carlsson <andersca at apple.com> has granted Antti Koivisto
<koivisto at iki.fi>'s request for review:
Bug 137664: Add StringCapture helper for thread-safe lambda capture
https://bugs.webkit.org/show_bug.cgi?id=137664
Attachment 239740: patch
https://bugs.webkit.org/attachment.cgi?id=239740&action=review
------- Additional Comments from Anders Carlsson <andersca at apple.com>
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).
More information about the webkit-reviews
mailing list