<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>158173</bug_id>
          
          <creation_ts>2016-05-27 17:01:20 -0700</creation_ts>
          <short_desc>Clean up all C++ lambdas passed to methods other than callOnMainThread</short_desc>
          <delta_ts>2016-05-29 22:16:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=158172</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=158166</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>158185</dependson>
    
    <dependson>158187</dependson>
    
    <dependson>158196</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brady Eidson">beidson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1197278</commentid>
    <comment_count>0</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-05-27 17:01:20 -0700</bug_when>
    <thetext>Clean up all C++ lambdas passed to dispatch() methods

Now that we have C++14 we can make sure we don&apos;t do unnecessary copies of captured variables, as well as initialize things like protectors inside of the capture list.

By going through all of them we can probably also fix some thread safety issues.

I plan to grep through all of Source using:
grep -rn &apos;\[.\+\]\s*\((.*)\)\?\s*{\s*$&apos; .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1197279</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-05-27 17:02:41 -0700</bug_when>
    <thetext>I meant:
grep -rn &apos;\[.\+\]\s*\((.*)\)\?\s*{\s*$&apos; . | grep -v callOnMainThread

Because I don&apos;t want to conflict with https://bugs.webkit.org/show_bug.cgi?id=158166</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>