Skip to content

Commit

Permalink
minor build cleanups
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mhorowitz authored and facebook-github-bot-6 committed Nov 20, 2015
1 parent c8f3b43 commit facf8a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/react/jni/NativeArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma once

#include <jni/fbjni.h>
#include <react/MethodCall.h>
#include <folly/dynamic.h>

namespace facebook {
namespace react {
Expand Down
12 changes: 8 additions & 4 deletions ReactAndroid/src/main/jni/react/jni/OnLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit facf8a5

Please sign in to comment.