Delete conversion from Objective-C block to folly::Function
authorMichael Lee <mzlee@fb.com>
Tue, 26 Sep 2017 15:35:09 +0000 (08:35 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 26 Sep 2017 15:36:25 +0000 (08:36 -0700)
commitb68452582ffa61421534d7f61f4d5f06e077ed39
treed6c5f6da22f20378627ea19a69a93172df3c3a85
parent4af3040b4c2192818a413bad35f7a6cc5846ed0b
Delete conversion from Objective-C block to folly::Function

Summary: Objective-C blocks are stack allocated, and unless there is a proper assignment it isn't retained and the memory is freed. Because folly::Function used to move, it would hold a reference, but after switch to a constructor by-value, it no longer does this and we see a use-after-free.

Reviewed By: yfeldblum, ericniebler

Differential Revision: D5888606

fbshipit-source-id: fe4cabb2f2ae289cce0e7429e0af3935ba314720
folly/Function.h