Bug 158172 - Vet every C++ lambda that captures only [this]
Summary: Vet every C++ lambda that captures only [this]
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-27 16:55 PDT by Brady Eidson
Modified: 2016-05-27 17:01 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-05-27 16:55:49 PDT
Vet every C++ lambda that captures only [this]

At least a few of them are definitely unsafe, in that they are deferred but don't guarantee the lifetime of `this`

I found these by grepping for (pretty much) every lambda usage in WebCore and then narrowing down to [this] captures:
grep -rn '\[.*\]\s*\((.*)\)\?\s*{\s*$' . | grep "\[this\]"