WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137664
Add StringCapture helper for thread-safe lambda capture
https://bugs.webkit.org/show_bug.cgi?id=137664
Summary
Add StringCapture helper for thread-safe lambda capture
Antti Koivisto
Reported
2014-10-13 11:45:12 PDT
.
Attachments
patch
(2.08 KB, patch)
2014-10-13 13:43 PDT
,
Antti Koivisto
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2014-10-13 13:43:23 PDT
Created
attachment 239740
[details]
patch
WebKit Commit Bot
Comment 2
2014-10-13 13:45:08 PDT
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.
Anders Carlsson
Comment 3
2014-10-13 13:47:22 PDT
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).
Antti Koivisto
Comment 4
2014-10-13 16:02:58 PDT
https://trac.webkit.org/r174660
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