Commit 5a37f8c8 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

reduce inline code size of Executor::invokeCatchingExns

Summary: Some use-cases can be sensitive to inline code size, so reduce the inline code size of `Executor::invokeCatchingExns` just in case.

Reviewed By: vitaut, zhxchen17

Differential Revision: D26875990

fbshipit-source-id: 0b822f7425bb47c98837faf08216092b49a7ed38
parent 4d235eee
...@@ -231,8 +231,8 @@ class Executor { ...@@ -231,8 +231,8 @@ class Executor {
} }
template <typename F> template <typename F>
FOLLY_ERASE static void invokeCatchingExns(char const* prefix, F f) noexcept { FOLLY_ERASE static void invokeCatchingExns(char const* p, F f) noexcept {
auto h = [&](auto const&... e) { invokeCatchingExnsLog(prefix, &e...); }; auto h = [p](auto&... e) noexcept { invokeCatchingExnsLog(p, &e...); };
catch_exception([&] { catch_exception<std::exception const&>(f, h); }, h); catch_exception([&] { catch_exception<std::exception const&>(f, h); }, h);
} }
......
...@@ -18,8 +18,13 @@ ...@@ -18,8 +18,13 @@
#include <atomic> #include <atomic>
#include <folly/lang/Keep.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
extern "C" FOLLY_KEEP void check_executor_invoke_catching_exns(void (*f)()) {
folly::Executor::invokeCatchingExns("check", f);
}
namespace folly { namespace folly {
class KeepAliveTestExecutor : public Executor { class KeepAliveTestExecutor : public Executor {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment