Revert D36052198: Partially remove dependency on folly async
Differential Revision: D36052198 (ade685c621) Original commit changeset: 170d64a324a1 Original Phabricator Diff: D36052198 (ade685c621) fbshipit-source-id: 69d2b18e70a6267667432d6ed9dc1c5bc545b417
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ade685c621
commit
3804ccf898
@@ -13,7 +13,6 @@
|
||||
#include <fb/fbjni.h>
|
||||
#endif
|
||||
|
||||
#include <folly/futures/Future.h>
|
||||
#include <folly/io/async/AsyncSocketException.h>
|
||||
#include <folly/io/async/EventBase.h>
|
||||
#include <folly/io/async/EventBaseManager.h>
|
||||
@@ -24,7 +23,6 @@
|
||||
#include <Flipper/FlipperClient.h>
|
||||
#include <Flipper/FlipperConnection.h>
|
||||
#include <Flipper/FlipperConnectionManager.h>
|
||||
#include <Flipper/FlipperFollyScheduler.h>
|
||||
#include <Flipper/FlipperResponder.h>
|
||||
#include <Flipper/FlipperSocket.h>
|
||||
#include <Flipper/FlipperSocketProvider.h>
|
||||
@@ -44,9 +42,6 @@ void handleException(const std::exception& e) {
|
||||
__android_log_write(ANDROID_LOG_ERROR, "FLIPPER", message.c_str());
|
||||
}
|
||||
|
||||
std::unique_ptr<facebook::flipper::Scheduler> sonarScheduler;
|
||||
std::unique_ptr<facebook::flipper::Scheduler> connectionScheduler;
|
||||
|
||||
class JEventBase : public jni::HybridClass<JEventBase> {
|
||||
public:
|
||||
constexpr static auto kJavaDescriptor =
|
||||
@@ -417,7 +412,7 @@ class JFlipperSocketProvider : public facebook::flipper::FlipperSocketProvider {
|
||||
virtual std::unique_ptr<facebook::flipper::FlipperSocket> create(
|
||||
facebook::flipper::FlipperConnectionEndpoint endpoint,
|
||||
std::unique_ptr<facebook::flipper::FlipperSocketBasePayload> payload,
|
||||
facebook::flipper::Scheduler* scheduler) override {
|
||||
folly::EventBase* eventBase) override {
|
||||
return std::make_unique<JFlipperWebSocket>(
|
||||
std::move(endpoint), std::move(payload));
|
||||
;
|
||||
@@ -425,7 +420,7 @@ class JFlipperSocketProvider : public facebook::flipper::FlipperSocketProvider {
|
||||
virtual std::unique_ptr<facebook::flipper::FlipperSocket> create(
|
||||
FlipperConnectionEndpoint endpoint,
|
||||
std::unique_ptr<FlipperSocketBasePayload> payload,
|
||||
facebook::flipper::Scheduler* scheduler,
|
||||
folly::EventBase* eventBase,
|
||||
ConnectionContextStore* connectionContextStore) override {
|
||||
return std::make_unique<JFlipperWebSocket>(
|
||||
std::move(endpoint), std::move(payload), connectionContextStore);
|
||||
@@ -944,11 +939,6 @@ class JFlipperClient : public jni::HybridClass<JFlipperClient> {
|
||||
const std::string app,
|
||||
const std::string appId,
|
||||
const std::string privateAppDirectory) {
|
||||
sonarScheduler =
|
||||
std::make_unique<FollyScheduler>(callbackWorker->eventBase());
|
||||
connectionScheduler =
|
||||
std::make_unique<FollyScheduler>(connectionWorker->eventBase());
|
||||
|
||||
FlipperClient::init(
|
||||
{{std::move(host),
|
||||
std::move(os),
|
||||
@@ -957,8 +947,8 @@ class JFlipperClient : public jni::HybridClass<JFlipperClient> {
|
||||
std::move(app),
|
||||
std::move(appId),
|
||||
std::move(privateAppDirectory)},
|
||||
sonarScheduler.get(),
|
||||
connectionScheduler.get(),
|
||||
callbackWorker->eventBase(),
|
||||
connectionWorker->eventBase(),
|
||||
insecurePort,
|
||||
securePort,
|
||||
altInsecurePort,
|
||||
|
||||
Reference in New Issue
Block a user