Summary: | Add StringCapture helper for thread-safe lambda capture | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, benjamin, cmarcelo, commit-queue, zan | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Antti Koivisto
2014-10-13 11:45:12 PDT
Created attachment 239740 [details]
patch
Attachment 239740 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/text/WTFString.h:642: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4]
ERROR: Source/WTF/wtf/text/WTFString.h:643: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4]
Total errors found: 2 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 239740 [details] patch 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). |