mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-12 09:20:14 +08:00
minor build cleanups
Summary: make DevSupportManager PUBLIC visibility, instead of adding to it more; put private parts of OnLoad into an anonymous namespace, and move NativeRunnable into it; don't make NativeArray depend on MethodCall which it does not use. public Reviewed By: astreet Differential Revision: D2651270 fb-gh-sync-id: d5262da79cbd60c4eb490d43d13cc625fa163cdf
This commit is contained in:
committed by
facebook-github-bot-6
parent
c8f3b43984
commit
facf8a56d2
@@ -3,7 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <jni/fbjni.h>
|
||||
#include <react/MethodCall.h>
|
||||
#include <folly/dynamic.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
@@ -60,10 +60,6 @@ struct ReadableNativeMapKeySetIterator : public Countable {
|
||||
, mapRef(mapRef_) {}
|
||||
};
|
||||
|
||||
struct NativeRunnable : public Countable {
|
||||
std::function<void()> callable;
|
||||
};
|
||||
|
||||
static jobject createReadableNativeMapWithContents(JNIEnv* env, folly::dynamic map) {
|
||||
if (map.isNull()) {
|
||||
return nullptr;
|
||||
@@ -515,8 +511,14 @@ static jstring getNextKey(JNIEnv* env, jobject obj) {
|
||||
} // namespace iterator
|
||||
} // namespace map
|
||||
|
||||
namespace {
|
||||
|
||||
namespace runnable {
|
||||
|
||||
struct NativeRunnable : public Countable {
|
||||
std::function<void()> callable;
|
||||
};
|
||||
|
||||
static jclass gNativeRunnableClass;
|
||||
static jmethodID gNativeRunnableCtor;
|
||||
|
||||
@@ -743,6 +745,8 @@ static void createProxyExecutor(JNIEnv *env, jobject obj, jobject executorInstan
|
||||
|
||||
} // namespace executors
|
||||
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
return initialize(vm, [] {
|
||||
// get the current env
|
||||
|
||||
Reference in New Issue
Block a user